Inactive [MECH] MultiInv V2.4.1 - Per World Inventories [1060]

Discussion in 'Inactive/Unsupported Plugins' started by Pluckerpluck, Feb 17, 2011.

Thread Status:
Not open for further replies.
  1. What I really need to know is what world you were moving to (and if you'd been there before). And which inventory was lost.
    Were you moving to a shared world and lost it all? Or did you move to another world, and come back to nothing. Or did you move to a world where you previously have items that you know lost.

    And I shall pull this request. Just needed a plugin.serialize(); under it to actually save the inventories to the file.

    I'm not even sure what worldSaveEvent actually is... wouldn't save-all be a server save... or is it multiple world saves? Have you tested if this calls when you use save all?

    However, pulling it causes no harm and will (if nothing else) lead to more frequent backups
     
  2. Offline

    jlogsdon

    WorldSaveEvent is called any time the server saves the files. It's not specific to save-all or stop or anything like that.

    edit: It's most likely per-world. I haven't had a chance to test as I'm at work, but I don't see why it wouldn't work with the serialize() call added.
     
  3. Offline

    Magesblood

    I am having the same problem, a lot of people on my server are losing items when going into another world and coming back.
     
  4. So when they come back their items are gone? Or they've reverted back to something they had before? I'll try and look into it.

    Turns out I lied... you don't need the serialize() because it's done in storeWorldInventory(). I was thinking of saveInventory()
     
  5. Offline

    Magesblood

    Their items are gone.
     
  6. Offline

    Drakonas

    I second the motion. I used the /world command by itself. It spawned me in a location way off from the actual spawn point (an issue with Essentials no doubt. That's not my concern). My inventory was cleared when I spawned. My only explanation is this plugin.
     
  7. Offline

    Travis_Hironak

    Code:
    2011-04-06 04:31:56 [SEVERE] Nag author: 'Pluckerpluck' of 'MultiInv' about the following: onWorldLoad has been replaced with a new signature, (WorldLoadEvent)
    So here I am to nag you ;).

    Thanks for this plugin, it's awesome :D.
     
  8. All their items? Both worlds? Or just the world they're coming back to... as if it deleted that inventory?
    For the next update I'll add a message into the console for if it "saves" a null inventory. Not many people have an empty inventory and it may help me catch the bug (unless someone else sees it in my code). It may be it thinks you haven't been to the world before... but I don't know why it would do that.
    As in, you teleported from one world to another (in which you have previously held items) and you lost the target worlds inventory? But you didn't lost the old one? Or you lost your inventory over every single world?

    Nag accepted and accounted for.

    EDIT: Those with problems. Would you mind using:
    /MultiInv debug start
    to start debugging and after someone, or you, experience the glitch end dubugging with:
    /MultiInv debug stop
    (Have to stop for this to work)
    The go to the plugins/MultiInv/logs and give me the latest log file please.

    If you can do this and tell me which player experienced the problem it may help me solve the problem.

    EDIT 2: If you REspawn in a different world than you die I currently have no idea what the effects are... be warned.
     
  9. Offline

    Drakonas

    EDIT: nvm, I was confused. I forgot I reset all world's inventories to fix my server issue a while back.

    /world sends you to the last world you were at. Sorry. Don't mind me. lol
     
  10. Offline

    Mentioum

    Just to clarify for all those who cant tell you the problem accurately as I am experiencing what I think they are trying to explain as well.

    ...................................................

    World 1: Have full inventory.

    World 1 -> World 2: Get new empty inventory (Yay as expected)

    World 2: Die some way or another.

    World 2 -> World 1: Respawn with an empty inventory.

    World 1: Much sadness and Admin nagging ensues.

    .....................................................

    To note:

    • There is no problem when the worlds have shared inventories.
    • It continuously happens. Not only the first time one goes to the new world and back.
    • There is no error output in console, otherwise I would post it and probably be able to tell you what is broken.

    Thanks very much. I appreciate this plugin a huge amount as it allows me to do fun projects in my large community without damaging the survival world at all! Hopefully you can get this sorted.

    Mentioum

    P.S Why on earth can't people just learn to not be complete idiots when submitting their errors is beyond me -_-'.
     
  11. Offline

    Magesblood

    So i have 4 worlds. They spawn in World 1 and World 1 shares inventory's with world 2 and 3. The problem occurs when they enter world 4 and then enter back into world 1. It appears they lose all their inventory for world 1 2 and 3 but not 4 after this happens. The only way you can go between worlds on my server is portals.

    It should have nothing to do with the dying bug people are experiencing because i have a per world spawn on and i tested dying and walking though the portal.
     
  12. 1) I think I love you.... in the good way....
    2) I'm working on understanding how this works... respawning doesn't seem to count as teleporting... so I'm going to have to add it manually. (Temp fix is to turn on per world respawning)

    Does this happen consistently or randomly? And can you try the /MultiInv debug start steps I detailed in a previous post. I could really do with the debug log...

    I think I'm going to add a way server owners to display the debug data to other people without making them an admin. Would allow me to come onto the server and view the error first hand.
     
  13. Offline

    bryan "TheCow"

    I get this error "An internal error occurred while attempting to preform this command", along with
    Code:
    org.bukkit.command.CommandException: Unhandled exception executing command 'mult
    iinv' in plugin MultiInv v1.4.0
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80
    )
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:2
    54)
            at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:596)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:559)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:553)
            at net.minecraft.server.Packet3Chat.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
            at uk.co.tggl.Pluckerpluck.MultiInv.MultiInv.performCheck(MultiInv.java:
    124)
            at uk.co.tggl.Pluckerpluck.MultiInv.MultiInv.onCommand(MultiInv.java:118
    )
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    >
     
  14. Offline

    Magesblood

    After testing it with multiple people it seems it only happens for the first time a person goes to the world then comes back. After the first time the inventory system works completely fine.
     
  15. Eh... did you try "/MultiInv" without any arguments? Nobody has done that yet and I'm guessing that's what caused the error. Fixed for next release,

    I may have found the problem. Fixing and releasing tomorrows. It's midnight here.

    Edit: I have built my latest version now and am posting it here

    DO NOT USE THIS ON A PRODUCTION SERVER!!!!!!
    (Not my plugin, the link below.... my plugin isn't going to annihilate your server... the link below... that I'm not so sure about.)

    I have no tested it AT ALL and chances are it will probably fail to run at all (because I always miss something stupid). And in this is may corrupt and inventories.data files. The only reason I posted it is that if one of you would like to test it out and, if bored, fix any errors that arise. And if it does work, great.

    Just didn't want one timezone stuck another day without any form of update (though this may amount to the same thing).

    Latest code on github, attempt at Version 1.5.1 : http://bit.ly/hNLunj

    Goodnight
     
  16. Offline

    SparrowMaxx

    I keep getting this lovely error:
    Code:
    20:15:42 [SEVERE] Could not pass event PLAYER_TELEPORT to MultiInv
    java.lang.NullPointerException
            at uk.co.tggl.Pluckerpluck.MultiInv.MultiInvPlayerData.itemStackToObject
    (MultiInvPlayerData.java:21)
            at uk.co.tggl.Pluckerpluck.MultiInv.MultiInvPlayerData.inventorySlotsToO
    bject(MultiInvPlayerData.java:49)
            at uk.co.tggl.Pluckerpluck.MultiInv.MultiInvPlayerData.saveInventory(Mul
    tiInvPlayerData.java:62)
            at uk.co.tggl.Pluckerpluck.MultiInv.MultiInvPlayerData.storeWorldInvento
    ry(MultiInvPlayerData.java:98)
            at uk.co.tggl.Pluckerpluck.MultiInv.MultiInvPlayerListener.onPlayerTelep
    ort(MultiInvPlayerListener.java:49)
            at org.bukkit.plugin.java.JavaPluginLoader$8.execute(JavaPluginLoader.ja
    va:246)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:255)
            at net.minecraft.server.NetServerHandler.teleport(NetServerHandler.java:
    286)
            at org.bukkit.craftbukkit.entity.CraftPlayer.teleport(CraftPlayer.java:1
    71)
            at com.onarandombox.Rigby.MultiVerse.MVPlayerListener.onPlayerMove(MVPla
    yerListener.java:313)
            at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.ja
    va:240)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:255)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:128)
            at net.minecraft.server.Packet10Flying.a(SourceFile:126)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    PLAYER_TELEPORT becoming anything under the sun if you plugin needs that hook. You sure you added in those classes properly?
     
  17. Offline

    Phaedrus

    Eagerly awaiting a few bug fixes. Right now inventories are sometimes not saving between worlds and sometimes when you die you still have your inventory, except its an inventory from when you logged in.
     
  18. Ok, will release shortly... random PC error has left my screen at about 20% brightness so I can't see anything properly...
    I'll look into the respawn event now. See if inventory is cleared before of after you "teleport" to another world and what player.getInventory() returns. But I think I've fixed some problems.

    Will soon see if this is also my error. What craftbukkit are you using... I think the inventory call has changed recently... may require a fix from me.
     
  19. Offline

    fffizzz

    Ok, so doing some testing..
    - Player 1 has 45 bricks.. enters portal, inventory is now blank in new world..
    - Player 1 has nothing, enters portal going back to main world, inventory blank
    Now, it should return the inventory, but at this point it does not.
    However, if I give that person 45 bricks again, and he passes through, his inventory remains on both sides.


    In short, it seems it doesnt save the inventory on your first pass through the portals.
     
  20. Offline

    Mentioum

    Looking forward to the update. It seems you have found the problem. Congratulations. I'm thinking of writing some plugins myself. Is there a decent resource to learn the ropes? I'm pretty comfortable with most things.
     
  21. Update: Ok I've updated and the problems SHOULD all be fixed.

    If anyone experienced any major problems please reply quickly and I'll do my best to fix them... my most active time is just after I've released a new version (not because I believe it will fail or anything...)

    But as always I shall suggest backing up inventories.data. When my plugin fails there's always the chance it will take inventories.data with it (though that is much less likely now then in earlier versions)

    I wrote a reply to this... but apparently never posted it.

    I was going to say that if you wish to develop a plugin, and haven't looked at it at all yet, you could look up the "Basic Plugin Tutorial". A nice video tutorial detailing how to make your first plugin. Just search for it it the forums.
    Note: There's two versions. One is outdated but under it is the link to the new one. Make sure you're watching the correct one.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 9, 2016
  22. Offline

    Mentioum

    Thanks @Pluckerpluck if I get stuck I'll be pestering you when @Nijikokun is busy :)
     
  23. Offline

    Avous

    i also encountered a mult inv bug. the server was randomly crashing when people went to multiverse worlds and whenever the server goes down and i even reset it then it doesnt save peoples inventories when i reset it :p everyone loses what they gained since they first logged in even if it doesnt crashes if they dont log out manually


    on another note i just d/led 1-5-2 and...
    Code:
    2011-04-08 08:32:46 [SEVERE] Could not load 'plugins\MultiInv_1.5.2.jar' in folder 'plugins':
    java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:53)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:158)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:106)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:84)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Halllp T.T
     
  24. Both your original problem and this new problem are... interesting.
    1) Something was going horribly wrong if my plugin was causing server crashes
    1b) Inventories not saving.... were you resetting with /stop? If not my plugin wouldn't save.
    1.5.2 will save much more often now. Every time the world saves, my plugin will save.

    2) Erm... I've never seen that problem... try renaming the file to MultiInv.jar or maybe re-download.

    Edit... Is the file named 'plugins\MultiInv_1.5.2.jar' or if that just a really strangely worded error. I mean it seems to say the file is called that, rather than the file is located at.

    Your PC may not like the many .s or the file may have been corrupted in downloading.
     
    Avous likes this.
  25. Offline

    tremor

    omg inventories on my server are flip flopping.. how to stop this? Do I have to delete the inventories to fix this? Why is it doing this...
     
  26. What does flip flopping even mean??? Can you be much more specific please. Currently the part that is most likely to experience a glitch in my code is the re-spawn code. Do you spawn in the world you died in or not?
     
  27. Offline

    tremor

    using multiverse to /mvtp between worlds.. world1 inventories are becoming world2 inventories, world2 inventories are being deleted... there is no consistency to inventories at all between just 2 worlds.. I just updated to 1.5.2 - i shut down my server, deleted the inventories.dat and let it regenerate... still having the issue

    to add more information it seems as if players are getting 3 inventories... for 2 worlds, and they are swapping around as the move between world1 and world2

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 9, 2016
  28. Well... that sounds like a major problem...
    Right here's what I can do:
    1) Stare at code and attempt to magically find error
    2) Ask you for help

    I'm going number 2:
    1) What is your current shares.txt file. Are you trying to share world 1 and 2 or not?
    2) Can you run "/MultiInv debug start" run around for a bit through portals (causing the error if you can do it on demand) and then type "/MutliInv debug stop" (you need admin rights atm... or potentially MultiInv.debug can't remember)
    Then in the plugins/MultiInv/logs folder can you upload the log file for me to view it (the one with the latest number if there are multiple). If you can do that it will probably speed up my debugging about 100x

    Finally, what build of craftbukkit are you on?

    Edit: it does say that shares.txt loaded right?

    To chat with me: http://mibbit.com/?channel=#Pluckerpluck&server=irc.esper.net
     
    jasonznack likes this.
  29. Offline

    tremor

    There is no shares... world 1 and world 2 are not shared. Craftbukkit 617. Not using portals, using the /mvtp command from multiverse.

    Here is a debug log.

    Code:
    #-----RSAssassin changed world-----#
    Moved from yasmp to yasmp
    #-----tremor77 changed world-----#
    Moved from playland to yasmp
    Saved 'tremor77" "w:playland'
    Saved inventories to file
    Loaded 'tremor77" "w:yasmp'
    #-----tremor77 changed world-----#
    Moved from yasmp to yasmp
    #-----tremor77 changed world-----#
    Moved from yasmp to playland
    Saved 'tremor77" "w:yasmp'
    Saved inventories to file
    Loaded 'tremor77" "w:playland'
    #-----tremor77 changed world-----#
    Moved from playland to yasmp
    Saved 'tremor77" "w:playland'
    Saved inventories to file
    Loaded 'tremor77" "w:yasmp'
    #-----tremor77 changed world-----#
    Moved from yasmp to yasmp
    #-----tremor77 changed world-----#
    Moved from yasmp to playland
    Saved 'tremor77" "w:yasmp'
    Saved inventories to file
    Loaded 'tremor77" "w:playland'
    #-----tremor77 changed world-----#
    Moved from playland to yasmp
    Saved 'tremor77" "w:playland'
    Saved inventories to file
    Loaded 'tremor77" "w:yasmp'
    #-----tremor77 changed world-----#
    Moved from yasmp to yasmp
    I can now see 3 distinct inventories... and they are rotating between the 2 worlds as i move back and forth.. i also have installed essentials, worldguard, worldedit, craftbook
     
  30. Hm... my code thinks it's doing it right... You are describing the strangest problem I've heard yet...
     
Thread Status:
Not open for further replies.

Share This Page