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. MultiInv
    Version 2.3.2

    WARNING: On first time run, players inventories will be saved to which ever world they are currently in

    I am now using BukkitDev.
    http://dev.bukkit.org/server-mods/multiinv/

    Currently MultiInv is a very simple plugin that gives players a separate inventory for every different world running on the server. This opens up many opportunities for server owners to expand the potential of their server.

    For example:
    1. They could have a separate world where they host competitions (resource gathering) and they can be sure no cheating is taking place as this world will start you with a blank inventory.
    2. You can run a creative world along side a survival world without worrying about the survival getting spoiled by the easy to come by resources of a creative map.
    Features (open)




    Features:
    • Gives users a separate inventory for every world
    • Allows sharing of inventories over specific worlds





    (Updating from 2.1 to 2.2 requires inventory conversion)
    Download Latest Jar (2.3.2)
    If you desperate to bypass the URL shortening (and thus my stat collecting) click here

    In the config file, the first line should be:
    # Do you want health to be seperated across worlds (i.e. not shared)
    the plugin will make the config with this line wrong. There's no need to change it, you just have to know what it's meant to be to set the config correctly.


    Download converter to convert old inventories (always backup first / needs a gui)
    Note: If for any reason you don't know what a gui is... you almost certainly have one.



    Old Versions: 2.3.1, 2.3.0, 2.2.0, 2.1.0, 1.5.2, 1.5.0b, 1.4.0, 1.3.3, 1.3.1, 1.3.0, 1.2.0, 1.1.4, 1.1.3, 1.1.1, 1.1.0, 1.0.3, 1.0.2, 1.0.1, 1.0.0

    Source Code
    Post-2.1 Instructions (open)

    Post - 2.1:
    In shares.properties each line maps a "minorWorld" to a "majorWorld".
    I.e if you want to share worlds 1 2 and 3 you'd use:
    Code:
    world2 = world1
    world3 = world1
    
    so that both worlds use the inventory from world1
    Note that:
    Code:
    world2 = world1
    world3 = world2
    
    will probably NOT work, haven't actually tested to see if I check for it or the damage it may do if used incorrectly.
    It was explained very well here

    Pre-2.1 Instructions (open)

    Pre - 2.1:
    To currently share inventories between worlds edit the shares.txt file created.
    Every line represents a set of shared worlds so set up the file like this:
    Code:
    world1, world3, world5
    world2, world4
    
    This will share the inventories of worlds 1, 3 & 5 and then there will be another shared inventory for worlds 2 & 4. You are not allowed any overlapping worlds.
    Note: Spacing is important

    You can also use the following commands (with permissions needed) Edit: may be broken actually... working on it.
    Code:
    /MultiInv delete <playerName> (MultiInv.delete)
    *Deletes the inventory of the current player from file, used to clear excess data from data file*
    

    To Do:
    • Get commands working again
    Changelog (open)


    Version 2.3.1
    • Fixed NPE when using portals
    • Fixed config comment error
    Version 2.3.1

    • Fixed respawning ... again
    Version 2.3.0

    • Fixed respawn bug
    • Fixed portal teleporting not working
    Version 2.2.0

    • Changed system again
    • Fixed health
    Version 2.1.0



    • Changed entire saving system
    • Hopefully work in bukkit's broken system
    Version 1.5.2:



    • Potentially fixed first world travel bug
    • Potentially fixed loading correct inventory on respawn/death
    Version 1.5.0:



    • Fixed for craftbukkit 602
    • World change now completed using onTeleport
    • May have stopped glitch... not sure
    Version 1.4.0:



    • Added world names with multiple spaces (unless they contain [" "] excluding the brackets)
    • Completely re-did save system
    • Auto-convert old save version to new.
    Version 1.3.4: Fixed rollback problems for those with worlds loading after MultiInv




    Version 1.3.2: Added debugging (ironically this is a bit buggy)

    Version 1.3.1: Hopefully fixed the bugs people are getting... 1 person != good bug testing

    Version 1.3.0:
    • Hopefully fixed world sharing problems
    • If new, current inventory is stored as the inventory for the world they're in
    Version 1.2.0: Took out a long constructor (stop nagging warning in newer builds, broke it for older ones)




    Version 1.1.4: Almost certainly fixed plugin load order failure for shares.txt

    Version 1.1.3:
    • Allowed plugin to continue of wrong shares.txt
    • Potentially fixed plugin load order failure
    Version 1.1.1: Removed permissions requirement and actually implemented correct permissions node




    Version 1.1.0: Added world sharing support and added delete command

    Version 1.0.3: Fixed the fatal client NPE... I'm sure I did this time

    Version 1.0.2: Fixed fatal NPE in player clients (At least I think I did) Failed

    Version 1.0.1:
    • Fixed armour being taken over to new worlds
    • Published source to git (don't criticise too much)
    Version 1.0.0: Public Release




     
  2. Offline

    Mercury

    Cool! Can you make config file where we can whitelist world(s) like Nether?
     
  3. When you say whitelist a world what exactly do you mean. What about inventories that are shared across multiple worlds (so worlds are linked together)?
     
  4. Offline

    Mercury

    Yeah I didn't specify.
    I mean like Normal (World) <---> Nether are linked.
    And other Worlds (2,3,4 etc...) have separate inventory.
     
  5. Offline

    jlogsdon

    Me love you long time if you add this. WORLD_CHANGE (or whatever they call it) will probably make it trivial, right?
     
  6. I'm using a timer right now to check for world change. It's just not as efficient as a WORLD_CHANGE event. But I'm almost complete with the shared world inventory system. Will be easy to configure:
    something like
    Code:
    #Each in represents a set of shared worlds.
    #You cannot share one world with two worlds that aren't shared together
    # i.e Home, Nether, Super would share the inventories of home world and super
    Home, Nether
    Test, Dev
    
    Where the lines starting with # are comments. So that file would share the inventories of the Home and Nether worlds + share the Test and Dev worlds.

    Note: 1st world would overwrite the other ones on the same line if you have inventories stored in them as separate worlds.

    Think that's ok?
     
  7. Offline

    WMisiedjan

    Damn, Was working on this as a side project :(

    I was using the OnPlayerTeleport Event. Kinda worked well.

    Nicely done though!
     
  8. Offline

    Ketsugo

    Aaaah, getting Null Pointer Exception client crashing with this plugin. Teleporting to another world and then opening my (now changed) inventory triggers it. Any word on what exactly is causing this? D:

    Code:
    Minecraft: Minecraft Beta 1.2_02
    OS: Windows 7 (amd64) version 6.1
    Java: 1.6.0_21, Sun Microsystems Inc.
    VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
    LWJGL: 2.4.2
    OpenGL: GeForce GTX 460/PCI/SSE2 version 4.1.0, NVIDIA Corporation
    
    java.lang.NullPointerException
        at al.a(SourceFile:126)
        at ft.a(SourceFile:138)
        at ft.a(SourceFile:64)
        at ov.a(SourceFile:31)
        at ll.b(SourceFile:360)
        at net.minecraft.client.Minecraft.run(SourceFile:668)
        at java.lang.Thread.run(Unknown Source)
    --- END ERROR REPORT f6ee4390 ----------
    
    
     
  9. Offline

    storma

    Thank you kind sir, this is what I've been waiting for. :) You've made my server users very happy. ;)

    Edit: Just tested this and works well though you carry your armour across. That doesn't suit the survival/creative scenario to well. ie. give diamond armour in creative and take it back to survival.
     
  10. Fixed that, will update at the end of today because I'm out right now. I can't even remember what was causing the problem... it just started working when I changed something. Might remember when I look at it.

    I specifically knew that it would have to store armour as well because of the creative/survive split as well

    Erm, I haven't a clue at this because that error doesn't look like it comes from any plugin. Looks more like a client error... does it happen every time for everyone (and maybe on every server)?
    HOW! I couldn't get the OnPlayerTeleport to work. The event always took place before you changed world. So player.getWorld() always told you the old world you'd left. And then for some reason the event.getTo().getWorld() also gave me the old world. It was really annoying me. I was going to change to that when it was working.
     
  11. Offline

    iFearz

    Thnx! This exactly what I needed for my server!
     
  12. Offline

    WMisiedjan

    I figured that out to, But I used a delay Scheduler thingy to get the new world. But my plugin isn't complete eighter. quit working on it..
     
  13. OK, updated it to send armour across (however, if they've already been across then the armour will be saved in the new world)

    Also moved the inventory.data file that is created. If you want to still use it, move it to plugins/MultiInv instead.

    I've also published the source code... which scares me a little.

    Almost got shared worlds working as well. Should be out soon...
     
  14. Offline

    Ketsugo

    That's because it is--and I can't quite say anything for the other players (There aren't any! :V) on my local area server, but when I stop using this plugin server-side, I don't get the crash. SO!

    I'll look into it closer to see what's the issue, if it's an incompatibility or what.

    Specifically, it only crashes after I switch worlds in my server, and try to open my inventory, regardless of if it's empty or not.
     
  15. I'll throw in the updateInventory() refresh command for the next update. I didn't need it for my server so I had though it wouldn't be needed. When I next update it tell me if it helps. Also, what version of craftbukkit are you using? Is it much later that then version I tested it on (325) or earlier. There haven't been any updates that should break it, but currently I don't have the RAM to run the latest server on my PC with the client at the same time. Shouldn't be a problem soon though (the RAM problem that is).

    Edit: Does the server show an error. If it does that's many times more useful than the client error.
     
  16. Offline

    Ketsugo

    I'll get back to you on that when I get home later, can't quite fiddle around with my server while I'm out. :p
     
  17. Offline

    Windows_i7_920

    Suggestion: Allow a certain worlds to share an inventory while others would not. this would allow survival servers which have a nether to use this plugin to also run a freebuild map without causing the nether to become useless.
     
  18. Offline

    Stribbs

    if you log in on a removed world, you retain that worlds inventory and spawn on the default one. You also lose the defaults inventory in the process.
     
  19. Should be an easy fix. Will fix in next update I think...

    Working on that right now... though config file will originally be quite basic...

    I also think I know what the NPE problem is... don't use the latest version... fixing that is top priority because it's now happening to me and I think I know the problem... or I might not and it may be because I updated my craftbukkit...
     
  20. Offline

    Ketsugo

    Yeah, it's not throwing errors in the server console other than getting my connection dropped, it's a tricky one. :\

    Edit: Using Craftbukkit 345 or whichever one I could find that didn't break half of my plugins. :k
     
  21. I believe I've finally fixed that... it was an odd problem that only effected armour slots... shouldn't be happening now though. And if it does, report back telling me exactly what happened please.
    --- merged: Feb 20, 2011 2:26 AM ---
    Sharing inventories over different worlds is now avaliable. Please read the original post for more information.
     
  22. Offline

    Ketsugo

    It works correctly now, spot on!

    [​IMG]
     
  23. Offline

    Eplemosen

    I don't see why Niji's Permissions should be required for this plugin. How about using the ops.txt if Permissions is not installed? Or even better, an internal permissions file only for the MultiInv plugin.
     
  24. Offline

    Duendek86

    Is this ok?
    Code:
    Code:
    world1, world3, world 5
    world2, world 4
    Should it be
    Code:
    Code:
    world1, world3, world5
    world2, world4
    ????



    I have update to 1.1 from 1.0.1 and set shares.txt
    Code:
    Code:
    Duendedreams, INFIERNO
    outworld
    bukkit starts to show errors in console when it starts about it can not found that worlds :( I have to delete the new inventories.data and replace with the old one from 1.0.1, and let shares.txt empty to get it works, but y I can't share inventories between the worlds I want :(

    I'm running build 345
     
  25. Offline

    Phaedrus

    This is great. I look forward to setting this up soon.

    Now I just need per world permissions.
     
  26. Offline

    Eplemosen

    I don't think you should use BBCode in your shares.txt file. O,o
     
  27. Offline

    Duendek86

    hehehe I just want to show what i have changed :p But bbcode doen't work into code box xD
     
  28. Yes, that was wrong, that's for picking that up.

    Going to make it just use ops.txt if permissions isn't present. But probably won't add it's own permissions file... I'm hoping bukkit adds permissions one day in the future...
    --- merged: Feb 20, 2011 5:30 PM ---
    Updated now, no need for permissions and the node MultiInv.delete should actually do something now.
     
  29. Offline

    Eplemosen

    Thank you so much! :) Also, built-in permissions will be in the Bukkit preview. It's already implemented: http://leaky.bukkit.org/projects/bukkit/roadmap
     
  30. Offline

    Duendek86

    I'm still in troubles, all works nice but when I edit shares.txt

    Shares.txt
    Code:
    Duendedreams, INFIERNO
    outworld
    Erors

    Code:
    2011-02-20 20:34:23 [INFO] [MultiInv] version 1.1.1 is enabled!
    2011-02-20 20:34:23 [INFO] [MultiInv] shares.txt contains major non-existant world INFIERNO
    2011-02-20 20:34:23 [INFO] [MultiInv] shares.txt contains major non-existant world outworld
    2011-02-20 20:34:23 [INFO] [MultiInv] Plugin disabled.
    20-feb-2011 20:34:24 org.bukkit.craftbukkit.CraftServer loadPlugins
    GRAVE: com/nijikokun/bukkit/Permissions/Permissions (Is it up to date?)
    java.lang.NoClassDefFoundError: com/nijikokun/bukkit/Permissions/Permissions
        at com.nijikokun.bukkit.iConomy.iConomy.setupPermissions(iConomy.java:285)
        at com.nijikokun.bukkit.iConomy.iConomy.onEnable(iConomy.java:142)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:135)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:430)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:175)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:74)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:55)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:171)
        at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:158)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:110)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:209)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    Caused by: java.lang.ClassNotFoundException: com.nijikokun.bukkit.Permissions.Permissions
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:30)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        ... 12 more
    
    Why it says that non exist INFIERNO and outworld? Multiverse 1.2 works fine with them.

    Iconomy error when i edit shares.txt ¿? I don't understand anything :p
    I'm running build 345 and permissions 2.0
     
Thread Status:
Not open for further replies.

Share This Page