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


    The health "bug" was a debugging code that made it into the alpha version. The 2.1.1 doesn't have it. Dude had set it to change the health to 10/20 (or whatever a half is) whenever it executes, which apparently was on teleporting, login and maybe a couple other times. I found it humorous that the WorldEdit compass teleport triggered it. Unless I'm incorrect, the only thing we're waiting on is a conversion tool (that works) from the 1.x format to the 2.x.
  2. Offline


    So no one else is experiencing it? Because when I or my users teleport to a different world, using stargates or commands our health always gets reset to full. I have been troubleshooting this for a while and even with MultiInv disabled this still occurs.

    If anyone else is experiencing these problems please try to contribute to the bug on Leaky. Thanks.
    AS1LV3RN1NJA likes this.
  3. Offline


    If it occurs with MultiInv disabled, wouldn't that indicate it's not a problem with MultiInv?
  4. Offline


    Yes ;). It occurs with every plugin except Essentials and Prekick disabled.
  5. Offline


    I guess I'm just trying to understand the relevance to it with this thread.
  6. Offline


    Well at first I thought it was MultiInv because of the health reset debug code that was discussed a few pages back. So I checked leaky and was surprised to find no bug to do with it so in my mind it made sense that MultiInv was the cause. As I investigated further (Which involved whining on IRC for hours) it appears that it was in fact a Bukkit bug.
  7. Offline


    it won't work anymore for me. 1.5.2 used to be fine before the 1.6 update.
    now with 2.1.0 everyone is able to take their inventory to my other world from my main world.

    Not much in the server log:
    2011-06-07 17:33:09 [INFO] [MultiInv] Shared worlds loaded succesfully
    2011-06-07 17:33:09 [INFO] [MultiInv] version 1.5.2 is enabled!
    2011-06-07 17:33:09 [INFO] [MultiInv] Shared worlds loaded succesfully
    2011-06-07 17:33:09 [INFO] [MultiInv] version 2.1.0 is enabled!
    CB 820
    multiinv 2.1.0
    minecraft 1.6.6

    I am soooooooo stupid.....
    Just as i clicked the 'Post Reply' button i noticed it was loading both 1.5.2 and 2.1.0 :p
    most plugins use the same name for each jar file but this one is named different. I must have forgotten to delete the old versions jar. :D
  8. Offline


    Were you able to convert the 1.5.2 inventory files to the 2.x format successfully?
  9. Offline


    MultiInv v.1.5.2 is working just fine with CB#835
    it did not work with CB#820
    Flobi likes this.
  10. Offline


    Oh, i just told my users to put their inventories in chests before logging off and then i deleted the inventory file and let it regenerate.
    If anyone lost his inventory its his fault. :D
    AS1LV3RN1NJA likes this.
  11. Offline


    I've got about 2500 users active, and I'd rather not go through an inventory wipe for people, it will cause a lot of problems. I'm still on 1.5, waiting on this plugin to be resolved with the converter issue. Any update would be appreciated, is it being worked on, or are we stuck with what we have?
  12. Offline


  13. Offline


    Me too, but I'd rather learn a new language first. Hence: I hope this works for everyone as well as it did for me going from 1.5.2 to 2.1.1. Just put it in the same folder as the file, run it, and it should create (then move the files from the "Inventories" to the "Worlds" directory and set up your file which is easy enough). I can't say if it'll work for everyone...or even anyone, frankly, but hurriedly learning eclipse and Java, downloading script fragments from all over the place and it works for my files. There's also if anyone wants the source. And, I don't mind taking a look at anyone's file if they have problems with this, though my knowledge of Java is limited entirely to this task so I can't say I'll be able to do much, but I'll try. :)

    One thing, bukkit/MultiInv uses the inventory of the main world when you login, no matter what it's files say you have, so you want to make sure your main world is downloaded at the same time as your file if you are doing it on a dev server to make sure bukkit thinks you're using the same inventory as MultiInv does. I HIGHLY recommend doing this on a test or dev server first.
  14. Offline


    @Flobi Thanks! Will test and let you know.
    Flobi likes this.
  15. Offline


    Wierd problem I'm still experiencing when I upgrade that everyone's being moved from whatever world they were in previous to the upgrade to whatever the primary world is. This affects MultiInv because it maintains the inventory of the world they were previously (MultiInv doesn't reload from it's save when they login.) It does this with or without MultiInv, so it's not directly a problem with MultiInv, but related enough for me to note it here.
  16. Offline


    Initial testing looks good, we are planning a full blown test on our live server tomorrow (will backup of course).

    I saw that it reset our location, but I thought that was just an MC or Bukkit issue, I'm almost positive that it did that prior to me upgrading to 2.x of MultiInv, because we tested all plugins without updating on our dev server.

    But yes, I could see where that will derp up some inventories, not sure how to resolve it either.
  17. Offline


    sadly this didnt seem to work for my server. I really wish the plugin author would get this issue fixed. ive lost a lot of server members because they were all ticked off from the inventories being messed up.
  18. Offline


    If you could get everyone to go to the main world for the update....2500 users? Wow, not really a realistic recommendation I was about to propose. Question though, is that location reset happening if you take all plugins out?

    @sam: not really a useful post. Sorry it didn't work for you. It sounds like you went ahead and updated your live server without testing in a test server well. If that's the case, it's probably not a situation that can be resolved with a script anyways. If you sent an file to me, at least I could take a look.
  19. Not sure if this is mentioned anywhere, but what format is in? I'm asking because I need to investigate some malfeasance on our server.
  20. Offline


    The file is stored from a variable defined as "ConcurrentHashMap<String, MultiInvPlayerItem[][]>" where "MultiInvPlayerItem" is (the source available in OP appears to be pre 2.x because it's loading the file). The first hash layer has two items. The first of those items has 36 subitems (normal inventory) an the second 4 (equipped items); each of these items are of type MultiInvPlayerItem but may be Null. It's written to a file using "fos = new FileOutputStream(file); out = new ObjectOutputStream(fos); out.writeObject(inventories);" (where "file" is the file path and "inventories" is the ConcurrentHashMap). If you want to know how to load the file, I recommend the source for the file I made a few posts back.

    The MultiInvPlayerItem has public methods for set and get of Id, Quantity, Data and Durability in setId(), getId(), setQuantity, getQuantity(), etc.

    If you're thinking about accessing the file from some language other than Java...good luck. For that, I'd recommend running the conversion script and accessing the 2.x data instead as it's essentially plain text. With either format, you won't be able to update the player's inventory even if you write to the file except if the inventory you are editing is for a world in which they are not currently. This is because the inventories are actually stored as the primary inventory for the primary world (normal bukkit functionality) and switched on teleport. So whatever inventory they currently have will be written to MultiInv's data files for that world whenever they switch worlds, overwriting any changes made to the files.

    Anyways, hope this helps.

    Oh, and the "String" part of "ConcurrentHashMap<String, MultiInvPlayerItem[][]>" is:
    {username}" "w:{worldname}
  21. Offline


    So this is all i do?
    world1, world1_nether, world, world2, world3, world4
    and i put the config to inventories = true?
  22. Offline


    Sadly, the OP doesn't help the issue, but it seems you are actually mixing the directions for 1.5 and 2.1. If you have the 1.5, your shares file should be as you quoted and there is no where to enter an inventories option.

    The shares file you posted would make 2 possible inventories for your users, one for "world1" and one for "survival." "world1_nether, world, world2, world3, world4" would all use the "world1" inventory.

    If you have 2.1, then the shares file is completely different and the inventories setting is...well, it's irrelevant because it doesn't do anything. It's actually ignored (it's a presumption that you want it on since you got the plugin).

    The best bet to get it set up is to get a fresh copy of bukkit (you can use the one you already have, just copy the craftbukkit.jar file to a new empty directory), run it, stop it, put the MultiInv.jar in the plugins directory, run bukkit, stop bukkit. Then, you'll have a copy of the sample config files for whichever version you have. (Fact is, I may even be confusing them cause I'm reading the OP..., but the directions here will give you the example config which includes directions related to the version which is installed.)
  23. Offline


    Thanks for the reply, Yah i just downloaded a fresh .jar a day ago. I checked upon server start and it says v2.1, I'm still a little confused on the directions...

    Even with a fresh copy of bukkit and the new jar, the config file doesnt explain exactly how to use it, and the OP is confusing. Could you post what you have working, mabye i could figure it out from that.

    Right now every world has its own inventory, and they are all saving correctly when i move from one to another. but i want to share all but survival together.

    I guess
    # Example 2: To share the nether of world "world" with "world"
    # world_nether = world
    world1 = world1_nether, world, world2, world3, world4
    survival = yah im confused lol unless i have to make a mesh topography and link each world to each other world.
  24. Offline


    I'm confused, in the new update I can't figure out how to get two worlds to share one inventory while the others all have seperate ones. Is the feature gone or just hiding somewhere?

    Nevermind, I just didn't read the main post. Although I still can't get it to work, I'm gunna try downgrading from 1.6 as it's been causing other problems too. I'll let you know if that fixes it.
  25. Offline


    Good job. With the version, we can be a bit more definitive (so everything below is for 2.1.x). Basically, you have to think of it like this:

    How many inventories do you have? 2
    What are the primary worlds those apply to: "world1" and "survival"
    What secondary worlds? Well, the rest of them and they all use the same inventory as "world1".

    You only have to specify the secondary worlds in the 2.1 setup. In the file, specify each "minorWorld" as the config file calls it by saying it equals a "majorWorld," e.g. world1_nether is a world using the inventory of world1 so add this to the config:

    world1_nether = world1
    In mine, I have two nethers and two normal worlds, so my is (without the comments)

    survivalnether = survivalnormal
    creativenormal_nether = creativenormal
    Meaning that the two nethers (creativenormal_nether was called creativenether until the 1.6 made me rename it) are the secondary worlds and the config sets them to use the same inventories as their respective primary ones.

    If I understand your previous post where all the worlds you want to share inventory with world1 are listed on the same line with it, your should be:

    world1_nether = world1
    world = world1
    world2 = world1
    world3 = world1
    world4 = world1
    Any world not specified is considered to use it's own inventory, so "world1 = world1" nor "survival = survival" is necessary (I do not know what would happen if you included those lines).

    Now, for the config.yml: There are two values in the default file, "health" and "inventories." Health specifies whether the health is joined in the same fashion as inventories. "Inventories" is ignored an presumed to be true as the default config says, "Currently does nothing, currently assuming that you got the plugin to share inventories". So your config.yml could (presuming you want health to be tracked like inventories) could be as simple as:

    health: true
    inventories: true
    (I recommend leaving the inventories value in there as it may function in the future and you don't need to add confusion to any upgrades you might do.) There is also an "ignore" value you can specify comma seperating any users you want to always use the same inventory, might be good for admins who need to carry around a Thor's hammer or WorldEdit woodaxe.

    Hope this helps! :)
    Don Redhorse likes this.
  26. Offline


    Wow thanks man , that explains it entirely. I assume since you were able to describe it in such detail that you have it up and running on your server. I would suggest that you add the above comment to the FAQ for the mod creator lol.

    I'm sure ill find this out after i mod my file, but going from world2, to world 3 will function the same as world1 to world2? Meaning its a full mesh, not partial.
  27. Offline


    MultiInv's mostly working for me now, here's how:
    1. Download and use Craftbukkit #838, not #818/#819. Yes, it's not an RB, but there seems to be a commit somewhere along the way that fixed MultiInv confusing inventories between worlds.
    2. Use Flobi's converter, and copy/move "Inventories" to "Worlds".
    3. Start your server!
    So far I haven't gotten any nasty surprises, but I'm still testing on my server.
  28. Offline


    Your welcome. Yes, I'm up and running and it felt like it took forever to do get there. I don't think I can add it to the FAQ.

    Honestly, I don't understand the last paragraph.

    I had too many problems on 819 to blame any of it on anything, few plugins had been updated and any one could have been causing any of the problems I was seeing. With craftbukkit #839 and MultiInv 2.1.1 I have seen absolutely no problems whatsoever except the server resetting the location of the player when it is updated, copying the inventory of the player from whatever world they were in to whatever is set as the main world (in the file).

    Actually, you know what I have seen one weird issue, but I don't think it's MultiInv related. Occasionally when I place slabs, something about the slab changes, the texture is stretched a full block (it's a half-block texture) cutting half it off; when I place a doubleslab of the same stack (i.e. the same inventory slot) it gets the texture covering it's whole side (it's possible it's using the top texture instead of a stretched side texture). If I type I (inventory) and move my mouse over it, my client crashes. The only way to get rid of it is to either clear my inventory (/cleari command from CreativePlus) or drop the whole stack with Q (or whatever my drop key is assigned to). Honestly, I think it's a client issue.

    For the directions you gave..., don't forget to back up your world files everyone. Make that before step 1. And do all this on a TEST server with all your other plugins before trying it on your LIVE one and piss everyone off by deleting their junk.
  29. Offline


    I'm also using 838, and thanks to you flobi its working flawlessly.
  30. Offline


    I have a server that only has two worlds and I want the inventories to be separate. If I just download the latest .jar file and install it in my plugin directory for my server, will it keep the inventories separate by default? I'm not worried about all this sharing stuff as I only have 2 worlds and I don't want either of them sharing inventories.
Thread Status:
Not open for further replies.

Share This Page