I need a plugin that will prevent people from opening their inventory in the first 1 second after a teleport (Using essenitals warps). I need it since this bug exists. It's that simple. Not sure if i can give you money for it due to bukkits rules but if you do it i would be SO happy!
This is something I will make due to the need of it on my server. Thanks for bring this up. I'll pm it to you if you want after i have made it
Can you describe the bug in more detail? Do the items actually STAY in the player's inventory PERMANENTLY? Or is it just lag. Can the player actually USE the items and throw them on the ground quickly to keep them? I ask because there is NO way to stop a player from opening his/her inventory without a client mod.
The items stays permanently, and he can use the items, no need for trowing them out Yea it's probably only for Multiverse Inventories EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Okay, well I got on my server and tested the issue with multiverse many times/ways. I saw no bug. I don't know what to say. Maybe you need to update your plugins? There is NO way to cancel a player from opening his/her inventory with the "e" button.
No, i'm using command blocks for teleporting, /warp Spawn @p this bug occour like 5% of the time, really hard to reproduce
Here's how to do it: Teleport from a survival world where you're GM is 0 or 2 to a GM 1 world. Then get some stuff, and teleport back to the survival world, in the moment you are in the survival world, (NOT asap when you teleport) QUICKLY open your inv. You need a lot of tries to get it working Note that if you have the mvinv.bypass.* permission, this wont work
[quote uid=106996 name="the_merciless" post=1752946]try this <Edit by Moderator: Redacted mediafire url> That plugin does absolutely nothing at all. The getInventory will never be null if the game is functioning correctly. meaning your if statement doesn't even matter and the closeInventory will get called every time. And if you do it on the same tick as the event then I doubt it will solve the problem. Even if a player doesn't have one open, it will still return that it has an inventory open. Aka the only real way to do this is to set up a repeating task that sends a closeInventory on a world change for a second or so each tick. Aka spam the client with the closeInventory.
First of all I used getOpenInventory() not getInventory(). This will check if the player has an inventory open when the world change event is called. Which I believe is when the player lands in the new world. Secondly I have no idea if this works, I spend a total of 3 minutes writing plugin I never even experienced this bug. Its just what I got from his description. Finaly aka = also know as
Okay i THINK it's fixed. What i did was setting the gamemode to creative in for Multiverse instead of using the __global__ region in WorldGuard to change the gamemode. Ill mark the thread as "filled" and ill return if it happens again. Ty for your interest in helping me
getOpenInventory will always return an inventory even if one is not open. This is because the player inventory is considered always open by the player. So getOpenInventory will return the inventory that they are looking at, or their own inventory if they have nothing open. It isn't really a bug, it is just the way it is in minecraft. That's why no packet is sent to the server when a player opens his own inventory, because it is always open. This makes it impossible to "close" their inventory on an open inventory event because it never gets called. Therefor, the only way to do this is to spam the client with a closeInventory command every tick or so for as long as you want them not to have anything open.
Yeah after a few tests, i found this to be right. I believe when the player presses E that is client side isn't it? I tried to use getViewers() which gave me a good result on the first few tests, and then started giving me wrong results. So it seems that spamming the user is the best option.
Correct, pressing e to open the player inventory is client side and doesn't send any indication to the server. The server always counts the player inventory as the default open one. So if you ever get null for getOpenInventory then there is literally something wrong internally on the server.