Filled Need a really simple plugin Quick!

Discussion in 'Archived: Plugin Requests' started by TheOnlyRealTGS, Jul 13, 2013.

  1. Offline

    TheOnlyRealTGS

    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!
     
  2. Offline

    GetGoodKid

    I'll see what I can do.
     
  3. There is no harm in donating to skilled developers that help you out ;)
     
  4. Offline

    TheOnlyRealTGS

    I was thinking about the "No selling" thing, but yea
    Thanks! :D
     
  5. Offline

    james137137

    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
     
  6. Offline

    GetGoodKid

    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.
     
  7. Offline

    james137137

    ok never mind it doesn't effect me (using multi inv plugin) so i wont be making this
     
  8. Offline

    TheOnlyRealTGS

    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.
     
    Last edited by a moderator: Jun 3, 2016
  9. Offline

    GetGoodKid


    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.
     
  10. Offline

    the_merciless

    Its a bukkit bug, mv have tried to fix but were unsuccessful.
     
  11. Offline

    TheOnlyRealTGS

    No, i'm using command blocks for teleporting, /warp Spawn @p this bug occour like 5% of the time, really hard to reproduce
     
  12. Offline

    the_merciless

    try this <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 6, 2016
  13. Offline

    TheOnlyRealTGS

    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
     
  14. Offline

    RingOfStorms

    [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.
     
    Last edited by a moderator: Nov 6, 2016
    GetGoodKid likes this.
  15. Offline

    the_merciless

    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
     
    bobacadodl likes this.
  16. Offline

    TheOnlyRealTGS

    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 :D
     
  17. Offline

    RingOfStorms

    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.
     
  18. Offline

    the_merciless


    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.
     
  19. Offline

    RingOfStorms

    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.
     

Share This Page