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. I've send an update to bukkitDev that will at some point be approved.

    Please SAVE AND BACKUP YOUR INVENTORY FILES AS I MODIFY THEY WAY THEY'RE SAVED!!!

    ALSO, DELETE YOUR CONFIG FILE TO GET THE NEW CONFIG SETTINGS

    There shouldn't be a problem but just because it works fine for me doesn't always mean it'll work for everyone else.

    Anyway, it adds splitting hunger and health without the stupid pain effect (except on respawn). It would split exp but the bukkit methods are a bit broken with that atm.

    You now set shares in "groups" which you can name. Then all worlds in a group share the same inventory. And there's a creativeGroups list that you can put chosen groups under. Any groups under the creativeGroups list will setGameMode(Creative) when the move into that world.

    Obviously these are all optional. Note: any worlds not in the creativeGroups sets the game mode to survival unless the config option is false.

    I've just realized there may be a respawn bug when it comes to setting the correct hunger... I'll look into that, I may have fixed it. I can't remember

    As said above I have added this to my plugin. The one problem I found with setting creative mode in some worlds on its own is the fact that the inventory is actually still there. If you switch to survival you'll have the same inventory so you can just go creative and get any items you want but placing them in the hotbar or picking them up off the floor.

    But people may wish to set creative mode worlds without MultiInv so I'd ensure your plugin stays up to date :D
     
  2. Offline

    Delois

    I am very excited to hear you have sent the update! I am hoping it gets approved soon, this is the only think I am waiting on for me to bring the creative wing of my server back up.

    I dont recall ever posting, but thanks for the plugin, glad to see it is going to be up to date soon! I came here to request the new features you already say you have added. I love your plugin and it has never caused me any issues.

    Any guess on how backed up dev bukkit is atm? or is there a link I could grab from somewhere to test er out?

    EDIT: Its there now :3
    EDIT2: Does not appear to write a new config file this version, could I get it?
    EDIT3:
    Code:
    2011-09-18 18:17:12 [SEVERE] Error occurred while enabling MultiInv v2.4.0 (Is it up to date?): 1
    java.lang.ArrayIndexOutOfBoundsException: 1
        at uk.co.tggl.pluckerpluck.multiinv.MultiInvConverter.searchFolders(MultiInvConverter.java:107)
        at uk.co.tggl.pluckerpluck.multiinv.MultiInvConverter.convertFromOld(MultiInvConverter.java:38)
        at uk.co.tggl.pluckerpluck.multiinv.MultiInv.onEnable(MultiInv.java:60)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:892)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:173)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:156)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    EDIT4: worked again restarting....
     
  3. ... wow

    Anyway, what were you doing with files with no extension in the "Worlds" folder? That's the only think that could cause the error you just showed. (It's also an example of a bug that I missed but should have caught)

    Plus if it crashes for any reason that may be why it didn't write the config file. But you have to delete the old one to get the new one. If that doesn't work for any reason open the jar file with winrar or similar and config.yml should be sitting inside.

    But I'm not sure... did that last edit mean you got it working? Or did you restart and then just die.

    On a side note: From now on I'll post a direct link in the bukkitDev forum (for my plugin) whenever I release for those who wish to get it earlier / before it is approved. I'll write a disclaimer or something so hopefully the admins won't get annoyed at me.
     
  4. Offline

    Delois

    I restarted the server again and it has been working 100% fine, I did not change anything, but all is well now.

    Anyways, thanks again, its working good and im loving it :3
     
  5. Offline

    heavy1metal

    I have this issue with 2.4.0. Clean bukkit install, no other plugins loaded, new world/world_nether generated. Bukkit version 1150.

    What I found out, it did not create the multiinv folder with the config. I ran 2.3.2 which created this default folder, put 2.40 back, and voila working.

     
  6. Ah, thank you for reporting that. I seem to have missed a simple check in my code as to whether the file exists before attempting to convert the old system. I'll fix this asap (even though it no longer seems a problem for you :D)
     
  7. Offline

    xvegan88x

    I get this:

    Code:
    >11:58:33 [SEVERE] Error occurred while enabling MultiInv v2.4.0 (Is it up to date?): 1
    
    java.lang.ArrayIndexOutOfBoundsException: 1
    
      at uk.co.tggl.pluckerpluck.multiinv.MultiInvConverter.searchFolders(MultiInvConverter.java:107)
    
      at uk.co.tggl.pluckerpluck.multiinv.MultiInvConverter.convertFromOld(MultiInvConverter.java:38)
    
      at uk.co.tggl.pluckerpluck.multiinv.MultiInv.onEnable(MultiInv.java:60)
    
      at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    
      at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:892)
    
      at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
    
      at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:173)
    
      at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:156)
    
      at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
    
      at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
    
      at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
    
      at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
    
    on bukkit 1152 on startup.
     
  8. Offline

    DrNoD

    hi. great plugin.

    i am using it on a multiworld server (multiverse 2.0-b265) with bukkit 1160.

    the problem is, that is have a respawn (on player dies) set per world. this worked all the time.

    if i install multiinv, i only spawn at the main spawn (spawn set by essentials)

    is ther a solution for this to turn off? Or is this a bug?

    Michael
     
  9. Offline

    Leviathanx

    MultiInv keeps disabling itself after converting my 2.3 file. it says the conversion was complete then disabling plugin. using 2.4.1 on #1183. Which bukkit build does 2.4.1 currently work on?
     
  10. Offline

    ArmEagle

    I'd love for that Inventory File Converter to have that third option Notch's -> 2.2 to work. And preferably accept a path and convert all the inventories found.

    We ran a vanilla 1.8 server for a while. But that's going to be the 'new' world. Though we want to keep the old world as the main 'entrance' one.
    So we have all these inventories of players in the 1.8 world that don't convert.

    Edit:
    Actually, why can't it just convert the inventory of a player the moment they switch to a different world (if the file doesn't exist yet)?
     
  11. Offline

    Tanite

    I'm trying to merge 2 servers that had the same worlds and players at different times.

    I cleared my own inventory and I was going to, one at a time, copy each of their name.yml files to myname.yml, then log in and put their stuff in one of their chests.

    However, when I login my inventory is still blank and when I log back out it rewrites a blank myname.yml. I removed Multiverse and pointed my server.properties file to the only world in question now. I also renamed all the MultiInv world folders except this one. I even removed my player.dat from the world folder. I'm just not sure what this plugin reads to get inventories and when, and when/where it saves it exactly. Any tips for recovery/merge?

    I'd love to have a /multiinv import worldname anyname.yml to load up an existing inventory file (or something).

    Thanks.

    EDIT: 1185/2.4.1
     
  12. Offline

    ArmEagle

    @Tanite I actually had the same problem myself. I hadn't thought about renaming the player.dat files, but that's an interesting approach.

    I did try to convert my old 'second world' player.dat to .yml and copy it over to this multi-world server. But just like you encountered, the file was ignored and overwritten on disconnect.

    This is becoming a much bigger problem than we had thought.
     
    Tanite likes this.
  13. This is at @Tanite as well.

    First, don't change the file name yourself. Any .data files should be auto converted (from 2.3 -> 2.4). If they're not that needs to be fixed.

    Second, I don't load inventories when a player logins in because I trusted Notch's player.dat to hold that info and it stopped me conflicting with any other plugins that mess with inventory on login. However, I could probably implement loading inventories on login if need be. That's actually a good idea now because it would allow you to edit my player.yml files for instant effect.

    EDIT: To be clear. When you login you get the inventory stored in notch's player.dat file.

    If you are willing to wait I could try implement this tomorrow or the day after (depends on how busy I find myself). I'll probably also add a config option that will work like this:
    Code:
    firstTimeLogin: loginType
    where loginType will be one of a few options (otherwise reverts to default).
    What this does is determines what happens when a user logs on for the first time into the system.
    The options will be:
    • default - This is default and means the inventory on login becomes the inventory for the world you log in to
    • blank - all inventories are blanked when a new player logs in so that they begin fresh
    • worldName - stores the inventory they log in with to this world and then logs in with a blank inventory.
    I'm not sure how to properly define a "new" user. I'm thinking just checking over the files stored and seeing what players have inventories stored under their name

    Thirdly, I don't know how to read notch's player.dat folders atm. Because of that I can only 'convert' from them when a player logs on. However, Bukkit is implementing an offlinePlayer so this may be possible in the future.

    Edit: I realise you want to copy player data from a non-Bukkit server to Bukkit. If you can't just move the player.dat files into notch's folder (don't know if it's possible if the world name is the same or if it's possible at all) then this isn't possible right now.

    I'll have another look to see if I can find how notch stores the inventories. But if I don't find anything I can't help.

    It should work on 2.4.1...
    Can you check the inventory files and see if they were converted correctly?
    When you open the files they should read:
    Code:
    survival: 0,3,2,4;39,0,3,0;!;!   etc...
    creative: 0,3,2,4;39,0,3,0;!;!   etc... (i.e the SAME as above)
    health: 20
    
    and the file should be called playerName.yml (obviously playerName = the players name).
    Note: inventories may start with a "!". My text was an example

    If these files exist for each player then check if the playerName.data files still exist. If they do remove them manually (move them to another place for backup until the server works).

    However, I will look into this to see if I broke conversion in any way. Strange it doesn't have any other message. I thought if I'd made it disable the plugin then it would relay some error message of some kind...

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

    Tanite

    I figured out how to solve my problem. I copied each person's .dat file to myname.dat and logged in one at a time to dump their stuff in a separate chest. I thought you were storing the source of their inventory in a multiworld setup but it appears the main world had what I needed in its players folder. Luckily I only had 7 or so users to do this for. Small userbase ftw :D

    So then what do you do with the data in the individual player.yml that you write for each world and how to they relate to one another?
     
  15. Offline

    fffizzz

    id kill myself doin that on my server. :D

    Code:
    ls | wc -l
    7400
    
     
  16. Offline

    xsolar66

    hmm. Hi @Pluckerpluck , MultiInv is working perfectly with 1.8.1 rb 1185 =) Just one thing I noticed, after a server restart, it says "New player detected", even if they've been on the server before...

    Works fine though =)
     
  17. Offline

    Raniy

    Is it possible to use the whitelist as a blacklist? IE I want unlisted players to have 'umodified' inventories. And listed players to have per world inventories.
     
  18. Offline

    ArmEagle

    Doh, that's kinda obvious. :)
    I guess I should have switched to a different world before copying the file.

    But it seems everyone who cares have their 'lost' items given manually on our server now. This multi-world stuff is pretty confusing :)
     
  19. Yea... trying to fix that strange problem.

    Should be possible. I'll look into it.
    Edit: So not atm, but maybe in the next version
     
  20. Offline

    Celtic Minstrel

    It seems that the creative/survival mode of a world is automatically enforced on login (or maybe world change?) rather than being stored if the user somehow manages to change it (eg if they were given access to the /gamemode command). It's not really a major issue, since changing again isn't hard, but something to think about?

    And inventories are stored in the NBT format, which is documented somewhere, possibly even on minecraft.net.
     
  21. Offline

    h0us3cat

    @Pluckerpluck do beds/respawn works in different worlds?
     
  22. Offline

    fffizzz

    its enforced to what ever game mode is set in server.properties on login and on world change.
     
  23. Offline

    Dagumboss

    This keeps causing my server to restart:

    Code:
    [SEVERE] Could not pass event PLAYER_TELEPORT to MultiInv
    java.lang.IllegalArgumentException: Health must be between 0 and 200
    at org.bukkit.craftbukkit.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:40)
    at uk.co.tggl.pluckerpluck.multiinv.MultiInvPlayerData.loadStateFromFile(MultiInvPlayerData.java:161)
    at uk.co.tggl.pluckerpluck.multiinv.MultiInvPlayerData.loadWorldInventory(MultiInvPlayerData.java:123)
    at uk.co.tggl.pluckerpluck.multiinv.MultiInvPlayerListener.onPlayerTeleport(MultiInvPlayerListener.java:68)
    at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:300)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at org.bukkit.craftbukkit.entity.CraftPlayer.teleport(CraftPlayer.java:269)
    at com.onarandombox.MultiverseCore.MVTeleport.safelyTeleport(MVTeleport.java:270)
    at com.onarandombox.MultiversePortals.listeners.MVPPlayerListener.performTeleport(MVPPlayerListener.java:221)
    at com.onarandombox.MultiversePortals.listeners.MVPPlayerListener.onPlayerMove(MVPPlayerListener.java:214)
    at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.java:286)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:180)
    at net.minecraft.server.Packet10Flying.a(SourceFile:126)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  24. Offline

    Rogueleader89

    well i have an odd issue happening with this plugin. It works fine for everyone except 1-2 players. When these players move between worlds they recieve back the exact same inventory every time. This is to say they have a set inventory of diamond and such which they can drop or use or whatever, go through a portal and back and have it all back again.

    running CB build 1190, multiinv 2-4-1.
    the following seems to appear on console each time one of these people changes worlds (or some variation of numbers thereof).
    Code:
    2011-09-25 23:09:00 [INFO] 260,4,!,0
    2011-09-25 23:09:00 [INFO] 6,6,0,0
    2011-09-25 23:09:00 [INFO] 17,4,0,0
    2011-09-25 23:09:02 [INFO] 260,4,!,0
    2011-09-25 23:09:02 [INFO] 6,6,0,0
    2011-09-25 23:09:02 [INFO] 17,4,0,0
    I have been unable to reproduce the bug with other players.

    EDIT: wiping out their inventories stopped my block duping problem, but now they lose their inventories in the world they came from whenever they go through a portal.
     
  25. Offline

    duhfux

    Lots of errors listed here. Pluckerpluck, your plugin is fantastic. You should update it for us poor souls!
     
  26. Offline

    TinyWeeny

    I apologize if this problem has been brought up before, but I am experiencing some item duping with MultiInv and MultiVerse-Portals.

    I have my MultiVerse permissions set up for default players like this (using PermissionsBukkit):

    multiverse.access.world: true
    multiverse.portal.access.*: true

    I have it setup this way for two reasons:
    1. I don't have to add every individual portal as a separate permissions line (multiverse.portal.access.Portal1: true , multiverse.portalaccess.Portal2: true , etc.). I have a lot of portals, but I'm only concerned with restricting access to certain worlds and not 'exclusive' portals, so it makes more sense to have it set this way.

    2. When a player attempts to enter a portal they do not have access to, they are presented with a 'You don't have access to go here...' error. This is nice because I don't have people running around bawling about how my portals aren't working. They know if a portal is borked or not because it either lets them through, or presents them with an access denied message.


    But here is the problem I am running into:
    • Player tries to access a portal to a world they do not have access too.
    • Player is presented with the 'You don't have access to go here...' warning.
    • Player inventory is swapped with the inventory from the other world.
    Before I changed the worldTypes: true option to false, players would even be given the 'creative mode' inventory if the portal is pointed toward a creative mode world, even if they are currently in a survival mode world.

    So idk what to do.

    For now, I have to add permissions lines for every portal on the server, which can be very tedious, and I am not satisfied with the fact that players are not alerted when they try to enter the wrong portals.

    Again, sorry if this is already a known issue. It takes a long time sorting through 33 pages of posts for individual issues. I guess that's part of the reason for BukkitDevs ticketing system.

    Some version information (all the latest recommended builds):

    Bukkit: 1185
    MultiVerse-Core: 2.0-b271
    MultiVerse-Portals: 2.0-b254
    MultiInv: 2.4.1

    Can yous help?
     
  27. Offline

    qwert1484

    @TinyWeeny

    I had a similar issue as to this at one point. The problem stemmed from when I had mis-referanced world inventory copying in some config or another. And due to my gratuitous lack of finesse in the programming area, or even little things like editing text files, I made the mistake of giving the worlds a sort of circular nesting of sorts... The idea here is to have one world and link as many to it as you can that are supposed to share, not link to one of the links... I hope that helps.... I'm a little overmedicated at the moment of typing. if you didn't try to edit worlds to share inventories though, you can probably safely disregard this.
     
  28. Right, I'm TREMENDOUSLY busy atm preparing to leave for uni. I will, however, attempt to look into all these problems later today.

    Sorry for any problems
     
  29. Offline

    PhantomServer

    Help, Using CB1138 and latest MultiInv. When I jump into a portal I instantly die even using /god or /gamemode
    If I delete the .data file then once I get killed again it starts happening again. PLZ HELP ASAP
     
  30. Offline

    Reytiger

    That sounds like a Multiverse problem, not MultiInv.
     
Thread Status:
Not open for further replies.

Share This Page