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

    Jdbye

    My inventory is also being reverted back every time I change worlds. Will try 1.3.1 shortly and see if the problem is fixed there.
    Edit: I have my survival inventory in the nether now, but it still gets reverted.
     
  2. Offline

    Jelle

    Some how this works for me now, look what i've done:
    shares.txt:
    And i've called it z_MultiInv.jar,
    because then it loads later than the worlds, so you don't get an error every time a world loads.

    One or both of this things have fixed the problem.
     
  3. I found that didn't actually help because my bukkit didn't load plugins alphabetically... it definitely moved but not to the start or the end of the plugin load list. + even though you may get errors, each time a world is loaded it will try and reload the shares.txt file so that shouldn't be a problem. (If it is I need to fix it)

    I really hope that 1.3.1 fixed that, there was a problem that I never seemed to get that I think I fixed
     
  4. Offline

    Jdbye

    Nope, other people are now also reporting their inventories being rolled back when they warp or change world, and since it can be used to dupe items it's just a matter of time before someone abuses it and places chests full of items everywhere, or something like that.

    It consistently happens to me every time I log out or change world, but if i shut down the server while I'm still logged in, my inventory saves properly.
     
  5. After updating to 1.3.1 you may have to remove the inventories.data file... but you shouldn't have to... the plugin should remove any unused inventories...

    Is this problem occurring when you change to a shared world, a non-shared world or all worlds? Also, what OSis the server on and what is your craftbukkit version? I don't experience this at all....

    Just a though: What other plugins do you have (anything that effects player log off perhaps)? Or is there any errors in the console? I'm going to add some debugging commands to a version soon... may help....

    It's just odd because I don't have these problems on my server... thought it's a very small server with only a few players...
     
  6. Offline

    nobotious

    i've ran into an glitch, i was in a secondary world i made called survival, gave myself a few items, gave myself a diamond pick, then the client crashed. the client crashes on connect every time now. i can clear the individual player.dat file for said player, (the default one in the world/player folder) and he'll spawn in the default world just fine, but the minute he goes through the portal he crashes. yet he's the only one. :/ i know that getting rid of your plugins inventories.dat allows him to spawn, but it also causes me to reset all my other players inventories :/ .

    is there any way to edit inventories.dat to remove a player from the system, just that player?

    also cb440
     
  7. as admin in permissions (or op) use /multiInv delete PlayerName. Assuming that still works it should do it... Not sure how you caused the crash though... it's not my plugins problem (I don't think so anyway) because it crashed whilst not loading/saving the inventory (unless it crashed while changing world). My plugin just saved the problem for later...

    Edit: Delete does work, it says deleted player atm though... should say player inventory
     
  8. Offline

    nobotious

    its a crash during world change. i'm not sure how it happened either lmao. guessing it was just a mod goof between commandbook and this somehow. i will test again a few times to see if i can reproduce the same error tonight. thanks though lol, i didnt know there was a delete command.

    edit: tried the delete command, got a few seconds further into the world lol. not sure it your mod doing this now, i'll get back to you on the outcome tonight. i'm baffled lol
     
  9. What I meant was what caused the crash 1st time. Subsequent times could be the fact that my plugin in loading the erroneous inventory. However, that you crashed again is odd. To completely remove a player (for sure because I forgot how I coded "delete") use the delete command then restart the server without that player logging on (delete when the player is not logged on).

    Even if it isn't my plugin the client error would be helpful
     
  10. Offline

    nobotious

    oh ok, well, the client crashes without error, it freezes. idk if theres a way to check the errors on a freeze, if there is i'd be glad to help.

    basically i used commandbook's /item command and gave myself some bedrock, then a diamond pick.
    when i was given the diamond pick the client crashed before the pick even showed up in my inv.
    i actually have a backup of my inventories.dat, so i can test this a few times. i will try the new method of delete your talking about, and see what that does for me

    EDIT: the thorough deletion doesn't seem to do the trick.
    though i have a backup of inventories.dat that works, i can keep trying to figure out what happened if you want me to.
     
  11. There's a chance you used a bad Id or commandbooks's Id for "DiamondPick" is wrong (however commandbook works for /item). If that's the case the client will crash because the Id doesn't have a corresponding item to go with it. But if you leave the client for long enough it "may" show an error. Then again, it might not.

    Edit: Discovered why "delete" won't work... I was accidentally returning the function after it found the first inventory.

    In other words: It removed the first inventory it found (i.e. first world alphabetically) then none others... fortunately I can now fix this delete bug. I still think that you gave urself a bad item though somehow.
     
  12. Offline

    nobotious

    yep, that was the issue, i did a bit of testing and used incorrect item id's and that is what caused the problem.

    must've accidentally typed /item 378, instead of /item 278 i'll nag sk89q about commandbook trying to spawn non-existent items. try to keep others from getting this issue.
     
  13. Wait... how did you get that shares.txt to work??? That should bring up the
    "shares.txt contains multiple instances of <world>" error... which would stop the shares.txt loading... if you can do that, it's a bug because world should share both ways without doing that

    They do for me using the shares:
    Code:
    HomeWorld, Nether
    Creative, Planetoid
    
    Inventories shared both ways... I need to add that debugging output soon so users can activate it and give me a properly logged error.
     
  14. Offline

    nobotious

    sk89q said he's going to add a check to commandbook to keep from "spawning" items that dont exist. :D
     
  15. Offline

    Jelle

    Yea, it does, but it still loads.
    And u don't know why it works when i do it, but it only works then, i've already tried it 2 times, and only this way works for me.
     
  16. Erm, from looking at my code I made a slight mistake. It adds the shared and only errors out when it finds the duplicate world (thus storing any lines before the error). -- So it doesn't have to be classed as a mistake -- Therefore I'm still pretty sure that the second line is redundant because the code ignores it. (Have you tried without the second line in the latest 1.3.1?)
     
  17. Offline

    Jdbye

    Just checked - only happens on shared worlds. My inventory saves correctly on the creative world (which is not in shares.txt anymore)
     
  18. Offline

    Silentspy

    one feature i would really like to see is a tool durability setting to turn this off per world, either way i really like this plugin!
     
  19. Offline

    Jdbye

    Tried removing the inventories.data yesterday, just got the first report of a inventory rollback today.
    There's nothing interesting in the console, and I don't think I have anything that affects logoff. My plugins are: Essentials, WorldGuard, WorldEdit, BigBrother, AutoSave, BorderGuardLite, ChickenBombs, Cleaner, CraftIRC, DeathChest, dynmap, FakePermissions, GroupManager, iChat, iConomy, Jail, LWC, MultiVerse, NoCheatPlugin, SignColours, Stackable, TreeHugger, MultiInv
     
  20. I can't see what the problem might be... what I'll do is, at least for Saturday as I'm busy now, is implement a debug mode that you can activate with /multiInv debug. It'll create a log file of everything that happens and then you'll be able to show me that... that should help me work out what the problem is.
     
  21. Offline

    bogboom

    Getting the following after making a nether world.

    Code:
     [SEVERE] Could not pass event ENTITY_EXPLODE to GuestPrev
    java.lang.NullPointerException
            at com.bukkit.sunshe.GuestPrev.GuestPrevEntityListener.onEntityExplode(GuestPrevEntityListener.java:27)
            at org.bukkit.plugin.java.JavaPluginLoader$41.execute(JavaPluginLoader.java:334)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
            at net.minecraft.server.Explosion.b(Explosion.java:206)
            at net.minecraft.server.World.a(World.java:1245)
            at net.minecraft.server.WorldServer.a(WorldServer.java:115)
            at net.minecraft.server.EntityFireball.f_(EntityFireball.java:157)
            at net.minecraft.server.World.a(World.java:1011)
            at net.minecraft.server.WorldServer.a(WorldServer.java:53)
            at net.minecraft.server.World.f(World.java:993)
            at net.minecraft.server.World.d(World.java:970)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:354)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
     
  22. Offline

    Jdbye

    /MultiInv delete Jdbye seemed to solve the problem for a little while, but as soon as I used /home my inventory got rolled back again. Maybe the problem is related to Essentials? It doesn't happen every time I use /home though, it seems completely random when the problem starts occurring, but once it starts, I have to delete my inventory to fix it.
     
  23. Offline

    Phaedrus

    Looks like there is something going on with your guest prev plugin. Perhaps it needs some configuration to accommodate the new nether world you just created.
     
  24. Problem with the delete command is it's actually broken. It only deletes one inventory at the moment (but that's fixed for next update). I'm working on debug mode now and there's a high chance it'll be done by the end of today (GMT). I may try to add a reload command which will refresh the inventories on the server...

    Edit: The fact that once it starts the problem stays is interesting. I think it means that something has gone wrong with the saving event...

    @bogboom That is definately not my plugin causing the problem. Speak to the author of GuestPrev

    General Question: Which would people prefer for logging:
    1. Log files (1->x) with x being the latest
    2. Log files (1->x) with 1 being the latest
    3. One log file that is always pre-pended (I don't know the opposite of append...) with latest info
    --- merged: Mar 4, 2011 7:08 PM ---
    Ok, I've updated the jar file and now delete will properly delete an account's inventories and there's a new debug command:
    You need permission 'MultiInv.debug' if you have permissions enabled.
    Use "/multiInv debug start [show]" to start debugging
    the show is in [] because it is optional letting you see the debugging take place.

    Then to save the debug (after changing worlds a few times and experiencing the bug) use "/multiInv debug stop".
    That should create a debugLog file in the MultiInv folder. Pastebin than and link it so I can have a look at it.

    Also, depending how many people you have on the server you could use "multiInv list" in the console to get a list of saved inventories (would save in the server log files) which you could also paste up which may help.

    I hope you understand that, good luck and I hope this helps find the bug.

    Edit: When creating the log fileit looks to use the earliest digit available
     
  25. Offline

    Jdbye

    I just discovered something - it seems to happen for everyone who was online when the server was stopped, because my inventory was working fine all day, and when I restarted the server while still logged in, it started being rolled back.

    Edit: Interesting... I deleted my inventory with debugging enabled, and it said:
    Jdbye w:survival has been deleted
    Jdbye w:creative has been deleted
    Jdbye w:survival w:nether has been deleted
    So it seems there's a duplicate inventory it keeps loading from, and I assume it saves to the wrong inventory, and that's the reason it gets rolled back.

    Edit2: Yes, that seems to be the problem, as I just deleted someone elses inventory that had the same problem, and it said it deleted w:survival and w:survival w:nether on them too, but when I delete someone's inventory that doesn't have the problem, it either says it deleted w:survival or w:survival w:nether, not both.

    Edit3: The first time people go to the nether the w:survival w:nether inventory is created and loaded if it doesn't already exist, but it keeps the old w:survival inventory (if they had one) - which is loaded when they go back to survival. And, as expected, after deleting my own inventory, and going to the nether and back, it both saves and loads my inventory as "w:survival w:nether", which is the way it's supposed to behave, I assume - so the problem seems to be that it sometimes (but not always) for an unknown reason saves a "w:survival" inventory, and once it does, it keeps loading from that inventory, and saving to the other one, causing rollbacks.

    By the way - I'm not sure the logging works properly, because I see everything ingame, but the log file hasn't updated, it still only has the same 5 lines it did earlier, and there are 16 people online.
    (Also, prepend IS actually the opposite of append)

    I'm not sure if any of this helps, but at the very least the problem seems to be duplicate inventories.
     
  26. You currently have to stop the debug or type "/MultiInv debug save" to post it to a file. And currently every debug "session" creates a new log file. It was sort of a quick implementation so I just gave it basic functionality. But there's the chance there's just a general bug and it's not posting it properly.

    That info is very useful. What should happen is that the worlds should be shared from the start (i.e NO w:survival on it's own). So I'll carefully look at the code and try to fix what the problem may be. I have an idea that may help but I'll have to see. I'll try to fix it asap but as you're the only person currently telling me they have this problem then you may be forced to be my tester (assuming you want to use the plugin...)

    Edit before I actually post: The answer to this question could solve your problem. Does MultiVerse load before or after MultiInv. If the answer if after then I think I know what the problem is, if the answer if before then I'll have to stare at my code more. + this is almost certainly a very large bug code wise.

    Because I'm bored I shall explain:
    When my plugin loads if cleans up inventories based on the shares.txt and if the worlds have changed shares. If the shares.txt fails to load (due to worlds not being loaded yet) the clean up script still runs, but based on no shared worlds... then my plugin loads the real shared worlds after they are loaded by MultiVerse but by that time the inventory damage is already done and inventories exist for each world (but in your case, nobody had an inventory for nether because it's a minor world and when you remove a share the inventory transfers to the major world).

    I REALLY hope that is the problem because I can think of a way to fix that...
     
  27. Offline

    Jdbye

    MultiVerse loads after MultiInv.
    Most of the time, the inventory is shared from the beginning, and there is no w:survival, so I don't know how it gets created, but it seems it can happen both before and after w:survival w:nether is created.
    Here's the whole log file in case you want it:
    Code:
    Loaded 'jodafishx w:survival'
    Loaded 'Y0ruba w:survival'
    #-----xSzyneKx logged out-----#
    Saved 'xSzyneKx w:survival w:nether'
    Saved inventories to file
    Loaded 'xSzyneKx w:survival'
    #-----xSzyneKx logged out-----#
    Saved 'xSzyneKx w:survival w:nether'
    Saved inventories to file
    Loaded 'xSzyneKx w:survival'
    'Jdbye w:survival' has been deleted
    'Jdbye w:creative' has been deleted
    'Jdbye w:survival w:nether' has been deleted
    Saved inventories to file
    'xSzyneKx w:survival' has been deleted
    'xSzyneKx w:survival w:nether' has been deleted
    Saved inventories to file
    'MarTango w:survival' has been deleted
    Saved inventories to file
    'Connor w:survival' has been deleted
    Saved inventories to file
    'jodafishx w:survival' has been deleted
    Saved inventories to file
    #-----xSzyneKx logged out-----#
    Saved 'xSzyneKx w:survival w:nether'
    Saved inventories to file
    Loaded 'xSzyneKx w:survival w:nether'
    #-----weiff logged out-----#
    Saved 'weiff w:survival w:nether'
    Saved inventories to file
    Loaded 'weiff w:survival'
    #-----pzduniak logged out-----#
    Saved 'pzduniak w:survival w:nether'
    Saved inventories to file
    Loaded 'pzduniak w:survival'
    #-----atheoran logged out-----#
    Saved 'atheoran w:survival w:nether'
    Saved inventories to file
    Loaded 'atheoran w:survival w:nether'
    #-----atheoran logged out-----#
    Saved 'atheoran w:survival w:nether'
    Saved inventories to file
    Loaded 'atheoran w:survival w:nether'
    #-----atheoran logged out-----#
    Saved 'atheoran w:survival w:nether'
    Saved inventories to file
    'atheoran w:survival w:nether' has been deleted
    Saved inventories to file
    Loaded 'Zantores w:survival'
    #-----pzduniak logged out-----#
    Saved 'pzduniak w:survival w:nether'
    Saved inventories to file
    Loaded 'pzduniak w:survival'
    #-----pzduniak logged out-----#
    Saved 'pzduniak w:survival w:nether'
    Saved inventories to file
    Loaded 'pzduniak w:survival'
    Loaded 'Gam193 w:survival'
    #-----pzduniak logged out-----#
    Saved 'pzduniak w:survival w:nether'
    Saved inventories to file
    Loaded 'pzduniak w:survival'
    #-----pzduniak logged out-----#
    Saved 'pzduniak w:survival w:nether'
    Saved inventories to file
    Loaded 'pzduniak w:survival'
    #-----pzduniak changed world-----#
    Moved fromsurvival to nether (Shared)
    Saved 'pzduniak w:survival w:nether'
    Saved inventories to file
    Loaded 'pzduniak w:survival w:nether'
    #-----pzduniak changed world-----#
    Moved fromnether to survival (Shared)
    Saved 'pzduniak w:survival w:nether'
    Saved inventories to file
    Loaded 'pzduniak w:survival'
    'pzduniak w:survival' has been deleted
    'pzduniak w:survival w:nether' has been deleted
    Saved inventories to file
    #-----Gam193 logged out-----#
    Saved 'Gam193 w:survival w:nether'
    Saved inventories to file
    Loaded 'Gam193 w:survival'
    #-----MarTango logged out-----#
    Saved 'MarTango w:survival w:nether'
    Saved inventories to file
    Loaded 'MarTango w:survival w:nether'
    #-----Gam193 logged out-----#
    Saved 'Gam193 w:survival w:nether'
    Saved inventories to file
    Loaded 'Gam193 w:survival'
    #-----Gam193 logged out-----#
    Saved 'Gam193 w:survival w:nether'
    Saved inventories to file
    #-----ToxicSmoKe logged out-----#
    Saved 'ToxicSmoKe w:survival w:nether'
    Saved inventories to file
    Loaded 'Gam193 w:survival'
    Loaded 'sadaxer w:creative'
    #-----Zantores logged out-----#
    Saved 'Zantores w:survival w:nether'
    Saved inventories to file
    #-----xSzyneKx logged out-----#
    Saved 'xSzyneKx w:survival w:nether'
    Saved inventories to file
    Loaded 'xSzyneKx w:survival w:nether'
    Loaded 'ToxicSmoKe w:survival w:nether'
    #-----Connor logged out-----#
    Saved 'Connor w:survival w:nether'
    Saved inventories to file
    Loaded 'Connor w:survival w:nether'
    #-----Connor logged out-----#
    Saved 'Connor w:survival w:nether'
    Saved inventories to file
    Loaded 'Connor w:survival w:nether'
    #-----Connor logged out-----#
    Saved 'Connor w:survival w:nether'
    Saved inventories to file
    Loaded 'Connor w:survival w:nether'
    Loaded 'Zantores w:survival'
    #-----xSzyneKx logged out-----#
    Saved 'xSzyneKx w:survival w:nether'
    Saved inventories to file
    Loaded 'xSzyneKx w:survival w:nether'
    #-----Gam193 logged out-----#
    Saved 'Gam193 w:survival w:nether'
    Saved inventories to file
    Loaded 'Gam193 w:survival'
    'Connor w:survival w:nether' has been deleted
    Saved inventories to file
    #-----test852 logged out-----#
    Saved 'test852 w:creative'
    Saved inventories to file
    #-----Gam193 logged out-----#
    Saved 'Gam193 w:survival w:nether'
    Saved inventories to file
    Loaded 'Gam193 w:survival'
    #-----xSzyneKx logged out-----#
    Saved 'xSzyneKx w:survival w:nether'
    Saved inventories to file
    #-----Jdbye logged out-----#
    Saved 'Jdbye w:survival w:nether'
    Saved inventories to file
    
    A easy fix would be to simply not save or load from any inventory not matching one of the shares, and maybe change how the share loading works so it doesn't care whether the worlds are loaded or not.
     
  28. Any reloads or restarts would have messed up your inventories if my theory is correct. Notice how w:survival was never saved on its own yet it existed. Therefore it must have been created before debugging. So I've waited to clean up saved inventories until the shares.txt actually loads successfully.

    I also realize that I need to add a "Logged in" line because I was confused why it was loading inventories when someone logged out :p

    Anyway, before I post this publicly (as if it doesn't work it has absolutely no effect on others) I'll give you a chance to try it out. http://bit.ly/i2GpIQ <- Version 1.3.3

    Unfortunately you will either have to remove inventories.data or delete all the problem accounts. But I really hope this works for you.
     
  29. Offline

    Jdbye

    Can you add a command to delete all inventories in a specific world/share so I can delete just the w:survival inventories? That would make it a lot easier.
    Edit: It seems to have deleted inventories.data for me, because it's 2KB now, oh well. I'll go to sleep and see if there are any w:survival inventories in the log file when I wake up.
    Edit2: Seems to be clearing the inventories.data every time I restart the server now. Luckily little or no actual loss thanks to them still being saved in the players' dat files.
    Though, when I shut down, it did say
    Code:
    Saved 'ToxicSmoKe w:survival w:nether'
    Saved inventories to file
    Loaded 'ToxicSmoKe w:survival w:nether'
    Saved 'Y0ruba w:survival w:nether'
    Saved inventories to file
    Saved 'Owen w:survival w:nether'
    Saved inventories to file
    Saved 'scottwitt w:survival w:nether'
    Saved inventories to file
    Saved 'weiff w:survival w:nether'
    Saved inventories to file
    Saved 'blahblahbal w:survival w:nether'
    Saved inventories to file
    Saved 'Gam193 w:survival w:nether'
    Saved inventories to file
    Saved 'Jdbye w:survival w:nether'
    Saved inventories to file
    Saved 'xXB3NNIB0IXx w:survival w:nether'
    Saved inventories to file
    Saved 'qlum w:survival w:nether'
    Saved inventories to file
    Saved 'xSzyneKx w:survival w:nether'
    Saved inventories to file
    Saved 'marcinmgs w:survival w:nether'
    Saved inventories to file
    Saved 'ToxicSmoKe w:survival w:nether'
    Saved inventories to file
    Saved 'Itheforgoten w:survival w:nether'
    Saved inventories to file
    Saved 'mcneelyl w:survival w:nether'
    Saved inventories to file
    
    so everything saves correctly, but inventories.data is being cleared on restart.
     
  30. Erm, it may have cleared up all the extra inventories that had been added and not deleted? There's no reason for it to have deleted itself... If it has and that's a bug, I am sorry.

    I'll also add the delete world option to help for later. Enjoy your sleep.

    Edit: at some point you'll want to ensure inventories save over a server reload or restart
     
Thread Status:
Not open for further replies.

Share This Page