WorldInventories
WorldInventories
Discontinued
As of 11/05/2013 I'm no longer working on this project. I haven't played vanilla/Bukkit in a very long time, updates are becoming tedious and break often requiring rewrites, and I'm not enjoying development any more. The last uploaded version for 1.5.1 works fine (aside from the importing), and there's a chance it will also work across updates, but moving to another plugin, such as MultiInv, is highly recommended - you should also be able to import settings in to it.
Description
Switch any of the following player information when teleporting between groups of worlds:
- Inventory,
- Armour,
- Ender Chest contents,
- Potion effects,
- Health,
- Hunger,
- Experience,
- Game mode.
Player information is separated in to small YAML files (that you can edit) based on groups. Designed to be fast, simple and easy to use.
Want to keep existing player information? Use the vanilla import option as outlined in the configuration example. Players will get a blank inventory by default if you don't import data first!
Need to chat, notify me of a bug, suggest a feature or try and get some help? Go to the IRC channel! (information down in Links)
How to use
Simply put WorldInventories in the Bukkit plugins folder, run it once, edit the config file it creates. An example is included below (with an explanation of each configuration option).
Any worlds not included in groups share a "default" group.
Changes in 1.7.0
Importing support for files previous to v5 has been dropped. This was necessary to clean the project up (just look at the GitHub page if you want proof!) and make it easier to maintain. If you need to import previous to this, use 1.6 as a go-between. Vanilla importing still works fine.
Other changes and additions:
- Added message hiding granularity (hide specific message types, on login for example),
- Added language support,
- Massive code cleanup,
- Event priorities changed a bit, should improve compatibility with other mods,
- Built against 1.5.1,
- Added API - tell me if you would like something added to it!
A note about the dev builds: All importing is currently broken. I'm fixing vanilla importing, it will involve using the OpenInv plugin to load offline player inventories. OpenInv is optional and only required when doing the vanilla import.
Language support
As of 1.7.0 a new file, langs.yml, will be created on the first plugin run. A new configuration option, "language: en_GB" will also be generated.
To add a new language:
- Run the new version once, it'll generate lang.yml in the same place as config.yml, and add "language: en_GB" to the config as a default,
- Open lang.yml, copy one of the sections and call it something (preferably the country code),
- Set "language" to whatever you called it, save,
- Either do "/wireload language" or restart the server, check the console to see if there were any errors when trying to load your new language.
If you add a different language please let me know, I can add it to the defaults!
Why no SQL support?
For a plugin like this, it isn't necessary. Files are very, very small (you'd probably hit 10kb for a player with a completely full inventory), load extremely quickly and are fast to copy and backup as they are.
If you disagree with me, provide a performance report to me on IRC (there are lots of plugins to profile performance) and I'll think about it again.
Configuration example (with explanations)
Version 1.7.0
# A "group" is a collection of worlds which will share an inventory. # In this example there are two groups, a creative and a survival group # Each group has an overworld and a nether, which will share an inventory # Inventory switching examples # Scenarios when the inventory will not switch: # creative_overworld to creative_nether # survival_nether to survival_overworld # survival_end to survival_overworld # Scenarios when the inventory will switch: # creative_overworld to survival_end # survival_nether to creative_nether groups: creativegroup: - creative_overworld - creative_nether survivalgroup: - survival_overworld - survival_nether - survival_end # Add a player to the "exempt" collection to make this plugin ignore them completely # No saves, loads or anything else done by this plugin will apply to them until you remove them from the list exempt: - exampleplayer - exampleplayer2 # This is deprecated as of 1.7.0 - use message-hidden at the bottom instead! # donotifications: true # Set this to true to make WorldInventories attempt to import MultiInv data # Automatically sets itself to false when an attempt is made domiimport: false # Set "miimportmode" to the integer identifier of the mode WI should import from (eg, 0 for MI survival) miimportmode: 0 # Set to true to make hearts, food level, experience and such track with inventory dostats: true # If a save interval is specified below, set this to false to stop it from outputting to the console outputtimertoconsole: true # Set to anything above 30 to make inventories/stats save automatically every x seconds saveinterval: 0 # Set "do78import" to true to force a conversion of the pre build 78 files for use in newer versions # Automatically resets itself to false on an attempt do78import: false # Set "do141import" to true to force a conversion of the pre version 1.4.1 files for use in newer versions # Automatically resets itself to false on an attempt do141import: false # Set "dovanillaimport" to true to attempt an import of the items and stats stored in players player.dat file # Set "vanillatogroup" to the group you want to import to. If blank it will use the default group. dovanillaimport: false # When this plugin loads it will automatically try to convert pre build 78 files and add "auto78updated: true" to this file if successful # When this plugin loads it will automatically try to convert pre version 1.4.1 files and add "auto141updated: true" to this file if successful # Set "dogamemodeswitch" to true and add groups to gamemodes as per the example to enforce gamemodes # SURVIVAL, CREATIVE or HARDCORE at the time of writing (follows Bukkit's names) gamemodes: default: SURVIVAL creativegroup: CREATIVE survivalgroup: SURVIVAL dogamemodeswitch: false # Below are 1.7.0 and above # Set language to something stored in lang.yml language: en_GB # To hide a particular message type, set any of these to true message-hidden: died-message: false changed-message: false nochange-message: false loaded-message: false
Commands & Permissions
There are two commands as of 1.5.7:
- /wireload: Reloads the configuration,
- /wiexempt [add/remove] [player]: Add or remove the player from the exemptions list (whether the plugin does anything to their information specifically, e.g. when they switch a world).
In 1.7.0 the reload command changed slightly:
- /wireload [all/language]: Reloads the entire configuration or just the language.
There are also two permissions:
- worldinventories.reload: Allows the use of the /wireload command,
- worldinventories.exempt: Allows the use of the /wiexempt command.
Licenses
This work is distributed under the BSD 2-Clause license. Read the license
This plugin also uses XStream. Read the XStream license
Links / Download
Bukkit require me to include this notice when linking Jenkins builds, like the one below.
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
Source code
Available in the BukkitDev downloads!
No beta builds.
Issues / known bugs
IRC - EsperNet #worldinventories
Donate
Use IRC for new build notifications, telling me about issues and getting faster help!
(Only shows stats for version 1.4.1 and above)

-
View User Profile
-
Send Message
Posted Mar 18, 2012Umm, either a config isn't generating or I can't find it.
...Any help?
EDIT: Resolved :P
-
View User Profile
-
Send Message
Posted Mar 15, 2012Is this normal when I have only these settings in the config? (using CB 1.2.3 Build 2066) WI 1.2.0 BETA
groups:
exampleworldone:
- exampleworldone
- exampleworldtwo
examplegrouptwo:
- exampleworldthree
What about the other settings that are shown in the example configuration?
-
View User Profile
-
Send Message
Posted Mar 13, 2012You Sir, are a legend! That was indeed the clue I had overlooked. The inventory info in the Players folder of ones primary map seems to be the key to success. Thank you very much for sharing your theory.
And yes, I can see the advantages of a small server.. but its too late :D
-
View User Profile
-
Send Message
Posted Mar 12, 2012@Fyreside
I've been trying to get answers about that from the devs of these kinds of plugins since MultiInv. I have yet to get what I would consider a clear answer :p
If I had to take a stab at it...
I think your inventory is stored by the server in the "world/players/" folder, but in a multi-world scenario, maybe only the main world (as specified in server.properties) holds a file for each player? Then maybe these plugins step in to swap that (single) inventory on-the-fly, as players move between worlds, using the data it stores in its own plugin folder about which inventory was in which world. If that is the case, then your main world's players folder will, at any time and for any given player, match whatever inventory they had when they logged off last, and that could be from *any world*.
That could be partially or even completely wrong. Perhaps someone will confirm/clarify.
As for restore/transfer strategies... I'm not really sure. Some days it's good to have a small server...
-
View User Profile
-
Send Message
Posted Mar 11, 2012Hi, I've been running this plugin for some time and it does a great job. I have it working on my latest server build, but despite how straightforward it all seems. I just keep misplacing my players inventory data.
So I'm here seeking a definitive answer as to where the players inventory data lives. And how to go about migrating that data from a server to its next build. For example. say I have maps A, B and C. Maps A and B are in a group and C is on its own. Should I not be able to copy my maps and my World Inventory data folders to the new server and have all the inventories intact? I have generetated a new map A, but it goes by the same name. And my config is set up the same way as it always was.
I know I must be missing something simple here. Can anyone help?
-
View User Profile
-
Send Message
Posted Mar 10, 2012Works fine with 1.2 Only one time a player his inventory didn't got switched. But once he came back to the main world he got his stuff still. So for some reason it didn't switched 1 time. No errors or anything but expect that its running fine for me :)
-
View User Profile
-
Send Message
Posted Mar 9, 2012@Royalgamer06
01:30:29 [INFO] This server is running CraftBukkit version git-Bukkit-1.1-R6-33-gb66156b-b2034jnks (MC: 1.2.3) (Implementing API version 1.2.3-R0.1)
...................
01:30:32 [INFO] [WorldInventories] Enabling WorldInventories v1.2.0
01:30:32 [INFO] [WorldInventories] Initialising...
01:30:32 [INFO] [WorldInventories] Loading configuration...
01:30:32 [INFO] [WorldInventories] Loaded configuration successfully
01:30:32 [INFO] [WorldInventories] Initialised successfully!
-
View User Profile
-
Send Message
Posted Mar 8, 2012Running on 1.2.3 without any problems. Will you add the XP per world as in Multiverse-Inv. here? That would be great.
-
View User Profile
-
Send Message
Posted Mar 5, 2012Just dropping in to say we've been running build #69 for 2 days without issues, thanks!
-
View User Profile
-
Send Message
Posted Mar 4, 2012@Jacob71
This doesn't sound like anything I can fix on my end, unfortunately.
-
View User Profile
-
Send Message
Posted Mar 4, 2012A player on my server found a dupe'ing exploit.
I have a factions world and a freebuild world, and in the factions spawn, there is a sign that will take you to the freebuild spawn when you click it. He gets an enchanted sword (or any item with an animation, he says), and right clicks (to block), and while blocking, he clicks the sign. When he gets to the freebuild spawn, he'll have his sword in his inventory. Then, when he goes back to the Factions world, he'll still have one in his inventory. He says it's kind of hard to do, and it only works sometimes. I checked his inventory while he was doing it, with OpenInv, and he definitely is duplicating swords.
I thought you should know this.
Other than that, great plugin, really useful! :D
-
View User Profile
-
Send Message
Posted Mar 3, 2012@CarrotCodes
Oh, I see now. I had downloaded v1.0.2 by mistake. *embarrassed*
I've switched to the "official" beta build v1.2.0, now. All is working fine for me. CB #2033. No issues so far.
-
View User Profile
-
Send Message
Posted Mar 3, 2012@TehSeph
Huh? They're the same thing?
-
View User Profile
-
Send Message
Posted Mar 3, 2012@Drayshak Could you perhaps add bypass permission nodes?
-
View User Profile
-
Send Message
Posted Mar 3, 2012Hmm. Your dev build 69 seems to be working on the latest 1.2.3 CB dev, whereas v1.2.0 isn't. O_O
Just thought I'd mention that in case you were unaware.
-
View User Profile
-
Send Message
Posted Mar 3, 2012@rezolution
On windows ALWAYS use WordPad! At least that can display linebreaks correctly ;)
-
View User Profile
-
Send Message
Posted Mar 2, 2012You are awesome, excellent. Thank you!
This is how I had to type it to get it to work in notepad. Using two spaces instead of one for yml tabs.
In notepad it's one line just like this.
I've also installed Notepad Plus Plus to help me edit yml files in the future.
-
View User Profile
-
Send Message
Posted Mar 2, 2012@rezolution
Your configuration is wrong. YAML cares about whitespace, so you must carefully align things. "creative", "pvp" and "hard" all need to go one tab to the right, so they are actually contained within the "groups" section.
Just to clear some more things up, I added some explanation of the default configuration to the most recent build. I'm considering changing the description above to this example configuration to make things easier for people.
-
View User Profile
-
Send Message
Posted Mar 2, 2012Thanks for the quick reply, :D
Here is that pastebin http://pastebin.com/86DUhkYB
Hope this helps.
-
View User Profile
-
Send Message
Posted Mar 2, 2012@rezolution
That message is only in the beta build, meaning this could be a bug. Could you Pastebin your configuration please (I think this commenting system borked it).