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

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

Thread Status:
Not open for further replies.
  1. Offline


    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


    Some how this works for me now, look what i've done:
    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. Offline


    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


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


    After updating to 1.3.1 you may have to remove the 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


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


    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


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


    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


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


    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


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


    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 (Text):
    2. HomeWorld, Nether
    3. 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


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


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


    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


    Just checked - only happens on shared worlds. My inventory saves correctly on the creative world (which is not in shares.txt anymore)
  18. 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


    Tried removing the 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. Offline


    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


    Getting the following after making a nether world.

    Code (Text):
    1.  [SEVERE] Could not pass event ENTITY_EXPLODE to GuestPrev
    2. java.lang.NullPointerException
    3.         at com.bukkit.sunshe.GuestPrev.GuestPrevEntityListener.onEntityExplode(
    4.         at$41.execute(
    5.         at org.bukkit.plugin.RegisteredListener.callEvent(
    6.         at org.bukkit.plugin.SimplePluginManager.callEvent(
    7.         at net.minecraft.server.Explosion.b(
    8.         at net.minecraft.server.World.a(
    9.         at net.minecraft.server.WorldServer.a(
    10.         at net.minecraft.server.EntityFireball.f_(
    11.         at net.minecraft.server.World.a(
    12.         at net.minecraft.server.WorldServer.a(
    13.         at net.minecraft.server.World.f(
    14.         at net.minecraft.server.World.d(
    15.         at net.minecraft.server.MinecraftServer.h(
    16.         at
    17.         at
  22. Offline


    /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


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


    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


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


    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


    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 (Text):
    1. Loaded 'jodafishx w:survival'
    2. Loaded 'Y0ruba w:survival'
    3. #-----xSzyneKx logged out-----#
    4. Saved 'xSzyneKx w:survival w:nether'
    5. Saved inventories to file
    6. Loaded 'xSzyneKx w:survival'
    7. #-----xSzyneKx logged out-----#
    8. Saved 'xSzyneKx w:survival w:nether'
    9. Saved inventories to file
    10. Loaded 'xSzyneKx w:survival'
    11. 'Jdbye w:survival' has been deleted
    12. 'Jdbye w:creative' has been deleted
    13. 'Jdbye w:survival w:nether' has been deleted
    14. Saved inventories to file
    15. 'xSzyneKx w:survival' has been deleted
    16. 'xSzyneKx w:survival w:nether' has been deleted
    17. Saved inventories to file
    18. 'MarTango w:survival' has been deleted
    19. Saved inventories to file
    20. 'Connor w:survival' has been deleted
    21. Saved inventories to file
    22. 'jodafishx w:survival' has been deleted
    23. Saved inventories to file
    24. #-----xSzyneKx logged out-----#
    25. Saved 'xSzyneKx w:survival w:nether'
    26. Saved inventories to file
    27. Loaded 'xSzyneKx w:survival w:nether'
    28. #-----weiff logged out-----#
    29. Saved 'weiff w:survival w:nether'
    30. Saved inventories to file
    31. Loaded 'weiff w:survival'
    32. #-----pzduniak logged out-----#
    33. Saved 'pzduniak w:survival w:nether'
    34. Saved inventories to file
    35. Loaded 'pzduniak w:survival'
    36. #-----atheoran logged out-----#
    37. Saved 'atheoran w:survival w:nether'
    38. Saved inventories to file
    39. Loaded 'atheoran w:survival w:nether'
    40. #-----atheoran logged out-----#
    41. Saved 'atheoran w:survival w:nether'
    42. Saved inventories to file
    43. Loaded 'atheoran w:survival w:nether'
    44. #-----atheoran logged out-----#
    45. Saved 'atheoran w:survival w:nether'
    46. Saved inventories to file
    47. 'atheoran w:survival w:nether' has been deleted
    48. Saved inventories to file
    49. Loaded 'Zantores w:survival'
    50. #-----pzduniak logged out-----#
    51. Saved 'pzduniak w:survival w:nether'
    52. Saved inventories to file
    53. Loaded 'pzduniak w:survival'
    54. #-----pzduniak logged out-----#
    55. Saved 'pzduniak w:survival w:nether'
    56. Saved inventories to file
    57. Loaded 'pzduniak w:survival'
    58. Loaded 'Gam193 w:survival'
    59. #-----pzduniak logged out-----#
    60. Saved 'pzduniak w:survival w:nether'
    61. Saved inventories to file
    62. Loaded 'pzduniak w:survival'
    63. #-----pzduniak logged out-----#
    64. Saved 'pzduniak w:survival w:nether'
    65. Saved inventories to file
    66. Loaded 'pzduniak w:survival'
    67. #-----pzduniak changed world-----#
    68. Moved fromsurvival to nether (Shared)
    69. Saved 'pzduniak w:survival w:nether'
    70. Saved inventories to file
    71. Loaded 'pzduniak w:survival w:nether'
    72. #-----pzduniak changed world-----#
    73. Moved fromnether to survival (Shared)
    74. Saved 'pzduniak w:survival w:nether'
    75. Saved inventories to file
    76. Loaded 'pzduniak w:survival'
    77. 'pzduniak w:survival' has been deleted
    78. 'pzduniak w:survival w:nether' has been deleted
    79. Saved inventories to file
    80. #-----Gam193 logged out-----#
    81. Saved 'Gam193 w:survival w:nether'
    82. Saved inventories to file
    83. Loaded 'Gam193 w:survival'
    84. #-----MarTango logged out-----#
    85. Saved 'MarTango w:survival w:nether'
    86. Saved inventories to file
    87. Loaded 'MarTango w:survival w:nether'
    88. #-----Gam193 logged out-----#
    89. Saved 'Gam193 w:survival w:nether'
    90. Saved inventories to file
    91. Loaded 'Gam193 w:survival'
    92. #-----Gam193 logged out-----#
    93. Saved 'Gam193 w:survival w:nether'
    94. Saved inventories to file
    95. #-----ToxicSmoKe logged out-----#
    96. Saved 'ToxicSmoKe w:survival w:nether'
    97. Saved inventories to file
    98. Loaded 'Gam193 w:survival'
    99. Loaded 'sadaxer w:creative'
    100. #-----Zantores logged out-----#
    101. Saved 'Zantores w:survival w:nether'
    102. Saved inventories to file
    103. #-----xSzyneKx logged out-----#
    104. Saved 'xSzyneKx w:survival w:nether'
    105. Saved inventories to file
    106. Loaded 'xSzyneKx w:survival w:nether'
    107. Loaded 'ToxicSmoKe w:survival w:nether'
    108. #-----Connor logged out-----#
    109. Saved 'Connor w:survival w:nether'
    110. Saved inventories to file
    111. Loaded 'Connor w:survival w:nether'
    112. #-----Connor logged out-----#
    113. Saved 'Connor w:survival w:nether'
    114. Saved inventories to file
    115. Loaded 'Connor w:survival w:nether'
    116. #-----Connor logged out-----#
    117. Saved 'Connor w:survival w:nether'
    118. Saved inventories to file
    119. Loaded 'Connor w:survival w:nether'
    120. Loaded 'Zantores w:survival'
    121. #-----xSzyneKx logged out-----#
    122. Saved 'xSzyneKx w:survival w:nether'
    123. Saved inventories to file
    124. Loaded 'xSzyneKx w:survival w:nether'
    125. #-----Gam193 logged out-----#
    126. Saved 'Gam193 w:survival w:nether'
    127. Saved inventories to file
    128. Loaded 'Gam193 w:survival'
    129. 'Connor w:survival w:nether' has been deleted
    130. Saved inventories to file
    131. #-----test852 logged out-----#
    132. Saved 'test852 w:creative'
    133. Saved inventories to file
    134. #-----Gam193 logged out-----#
    135. Saved 'Gam193 w:survival w:nether'
    136. Saved inventories to file
    137. Loaded 'Gam193 w:survival'
    138. #-----xSzyneKx logged out-----#
    139. Saved 'xSzyneKx w:survival w:nether'
    140. Saved inventories to file
    141. #-----Jdbye logged out-----#
    142. Saved 'Jdbye w:survival w:nether'
    143. 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. Offline


    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. <- Version 1.3.3

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


    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 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 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 (Text):
    1. Saved 'ToxicSmoKe w:survival w:nether'
    2. Saved inventories to file
    3. Loaded 'ToxicSmoKe w:survival w:nether'
    4. Saved 'Y0ruba w:survival w:nether'
    5. Saved inventories to file
    6. Saved 'Owen w:survival w:nether'
    7. Saved inventories to file
    8. Saved 'scottwitt w:survival w:nether'
    9. Saved inventories to file
    10. Saved 'weiff w:survival w:nether'
    11. Saved inventories to file
    12. Saved 'blahblahbal w:survival w:nether'
    13. Saved inventories to file
    14. Saved 'Gam193 w:survival w:nether'
    15. Saved inventories to file
    16. Saved 'Jdbye w:survival w:nether'
    17. Saved inventories to file
    18. Saved 'xXB3NNIB0IXx w:survival w:nether'
    19. Saved inventories to file
    20. Saved 'qlum w:survival w:nether'
    21. Saved inventories to file
    22. Saved 'xSzyneKx w:survival w:nether'
    23. Saved inventories to file
    24. Saved 'marcinmgs w:survival w:nether'
    25. Saved inventories to file
    26. Saved 'ToxicSmoKe w:survival w:nether'
    27. Saved inventories to file
    28. Saved 'Itheforgoten w:survival w:nether'
    29. Saved inventories to file
    30. Saved 'mcneelyl w:survival w:nether'
    31. Saved inventories to file
    so everything saves correctly, but is being cleared on restart.
  30. Offline


    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