Entei's Inventory Manager
Introduction
Entei's Inventory Manager
With this plugin, you can manage what inventory is loaded for your players when they join/visit another world. You can configure this plugin to load the individual players' inventory for each world, or you can set up what inventory is loaded for which world in the config.yml. This plugin will save and load all current Minecraft items, such as enchanted items, items with custom names, items with lore, and books. Other optional features include: Make players load certain saved gamemodes; Configure how the inventory data is saved(Beta)
Features
- Saved files are HUMAN READABLE, meaning you can edit them and/or modify them with another plugin!
- Saves and loads all kinds of item data(Books, lores, item names, damage values, enchantments[unsafe ones too!], you name it, we got it covered!)
- Choose what inventories are loaded for the player(per world inventories, or shared-world inventories with certain worlds excluded optionally)
- The players' normal inventory will be saved/loaded when necessary
- The players' enderchest(can be opened with a command, if the player has permission, or the player can obtain an enderchest like normal)
- Extra double-chest sized inventories per-player(players can be given permission for a command to view and edit these)
- ALL of the above features with optional gamemode-specific inventories! This means that you could have players in survival on one world, then they somehow obtain creative or adventure, and their inventory for their old gamemode is saved, and their new gamemode is loaded/created! This would be useful for adventure maps, when players only need to have certain inventories at certain times.
- Plugin can save/load the following:
- Per-world inventories(each world has its own inventory) OR
- Combined world inventories(world_a and world_c could share an inventory, whilst world_b would be all alone, this is configurable)
- Effects are saved(optionally) with gamemode and world inventories, as well as experience, health & hunger(&food exhaustion).
- Player health is able to be manipulated via commands in game by a player with permission or an operator.
- Player health and hunger/hunger_saturation can be (optionally)saved along with gamemode and world inventories. Also, I'm working on a /save_inv <custom_name> and /load_inv <custom_name> that will allow you to save your inventory, health, exp, hunger, hunger exhaustion level, etc. for Version 0.52! All optionally per-gamemode and/or per world, of course.
- More to come!
Upcoming Features
- [Version 0.6]Ability to choose what players are allowed to have what item(for example, eim.allowitem.ID.PlayerName or eim.denyitem.ID.PlayerName)
- [Version 0.6]Use an in-game command to help handle who can view your inventory. For example:
- /invperm {give|take} {view|edit} [gamemode] [worldName] {inv|ender|extra} {playerName} So, with that usage, the following command would allow joeBob to view(only view, not edit) Notch's survival ender chest for the world 'pvpWorld':
- /invperm give joeBob view survival pvpWorld ender Notch ...and this would take joeBob's ability to view that inventory away again:
- /invperm take joeBob view survival pvpWorld ender Notch To allow someone to edit an inventory, use the edit argument instead of the view one.
- [Version 0.6]Plugin API to be implemented allowing control of online and offline player's saved inventory data. For example, this function in particular would allow you to open the extra chest of someone who is not logged on: MainInvClass.openOfflinePlayerInventory(Player targetPlayer, String uuid/playerName, String invType, GameMode gm, World world);
- More to come!
Note: If you run a server with this plugin, I'd love to test it out with you! If you would like to do this, you can contact me @ [email protected], pm me here, or find Brian_Entei on Google+.
Commands
Commands, usages, and command permissions are in the plugin.yml. Here is a copy of that section:
/eim: Master command for this plugin. Permission: eim.cmd.use.eim Usage: /eim {info|save|reload} Aliases: /enteisinventorymanager /setmaxhealth: Operator's command to increase the amount of health target player can have. Requires permission to use. Permission: eim.cmd.use.setmaxhealth Usage: /setmaxhealth [target] amount OR /setmaxhealth -add [target] amount /view: Allows players to view either their own or another players: inventory, enderchest, or extra chest inventory. Permission: eim.cmd.use.view Usage: /view [survival|creative|adventure] {inv|ender|extra} or /view {playerName} [survival|creative|adventure] {inv|ender|extra} /invperm: Lets you control who can view your inventories. Permission: "eim.cmd.use.invperm" Usage: /invperm {give|take} {view|edit} {inv|ender|extra|armorinv|armourinv} {playerName} or /invperm {give|take} {view|edit} {gamemode} {worldName} {inv|ender|extra|armorinv|armourinv} {playerName} [ownerName]
Permissions
Here is the list of permissions, from the plugin.yml(copy and paste it into wordpad if it looks scrappy here):
permissions: eim.*: description: "Gives access to all permissions, commands, and abilites pertaining to this plugin." children: eim.cmd.use.eim: description: "Gives permission to use the /eim command." eim.cmd.use.view: description: "Gives permission to use the /view command." eim.cmd.use.setmaxhealth: description: "Gives permission to use the /setmaxhealth command." # eim.cmd.use.viewoffline: # description: "Gives permission to use the /viewoffline command." eim.cmd.use.invperm: description: "Gives permission to use the /invperm command." eim.cmd.use.disown: description: "Gives permission to use the /disown command." eim.cmd.use.claimitem: description: "Gives permission to use the /claimitem command." eim.view.others: description: "Gives permission to view another person's inventory, if they have that person's permission as well." eim.view.*: description: "Gives permission to view anyone's inventory(of any type), regardless of their permissions." children: eim.view.inv.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's inventory, but only when the per-gamemode and per-world saving modes are disabled." eim.view.gamemode.GAMEMODE.inv.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's GAMEMODE inventory, but only when the per-world saving mode is disabled." eim.view.inv.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's inventory in the world WORLDNAME, but only when the per-gamemode saving mode is disabled." eim.view.gamemode.GAMEMODE.inv.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's GAMEMODE inventory in the world WORLDNAME." eim.view.ender.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's ender chest, but only when the per-gamemode and per-world saving modes are disabled." eim.view.gamemode.GAMEMODE.ender.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's GAMEMODE ender chest, but only when the per-world saving mode is disabled." eim.view.ender.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's ender chest in the world WORLDNAME, but only when the per-gamemode saving mode is disabled." eim.view.gamemode.GAMEMODE.ender.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's GAMEMODE ender chest in the world WORLDNAME." eim.view.extra.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's extra chest, but only when the per-gamemode and per-world saving modes are disabled." eim.view.gamemode.GAMEMODE.extra.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's GAMEMODE extra chest, but only when the per-world saving mode is disabled." eim.view.extra.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's extra chest in the world WORLDNAME, but only when the per-gamemode saving mode is disabled." eim.view.gamemode.GAMEMODE.extra.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's GAMEMODE extra chest in the world WORLDNAME." eim.view.armor.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's armour inventory, but only when the per-gamemode and per-world saving modes are disabled." eim.view.gamemode.GAMEMODE.armor.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's GAMEMODE armour inventory, but only when the per-world saving mode is disabled." eim.view.armor.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's armour inventory in the world WORLDNAME, but only when the per-gamemode saving mode is disabled." eim.view.gamemode.GAMEMODE.armor.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's GAMEMODE armour inventory in the world WORLDNAME." eim.edit.others: description: "Gives permission to edit another person's inventory, if they have that person's permission as well." eim.edit.*: description: "Gives permission to edit anyone's inventory(of any type), regardless of their permissions." children: eim.edit.inv.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's inventory, but only when the per-gamemode and per-world saving modes are disabled." eim.edit.gamemode.GAMEMODE.inv.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's GAMEMODE inventory, but only when the per-world saving mode is disabled." eim.edit.inv.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's inventory in the world WORLDNAME, but only when the per-gamemode saving mode is disabled." eim.edit.gamemode.GAMEMODE.inv.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to edit PLAYERNAME's GAMEMODE inventory in the world WORLDNAME." eim.edit.ender.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's ender chest, but only when the per-gamemode and per-world saving modes are disabled." eim.edit.gamemode.GAMEMODE.ender.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's GAMEMODE ender chest, but only when the per-world saving mode is disabled." eim.edit.ender.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's ender chest in the world WORLDNAME, but only when the per-gamemode saving mode is disabled." eim.edit.gamemode.GAMEMODE.ender.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to edit PLAYERNAME's GAMEMODE ender chest in the world WORLDNAME." eim.edit.extra.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's extra chest, but only when the per-gamemode and per-world saving modes are disabled." eim.edit.gamemode.GAMEMODE.extra.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's GAMEMODE extra chest, but only when the per-world saving mode is disabled." eim.edit.extra.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's extra chest in the world WORLDNAME, but only when the per-gamemode saving mode is disabled." eim.edit.gamemode.GAMEMODE.extra.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to edit PLAYERNAME's GAMEMODE extra chest in the world WORLDNAME." eim.edit.armor.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's armour inventory, but only when the per-gamemode and per-world saving modes are disabled." eim.edit.gamemode.GAMEMODE.armor.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's armour inventory, but only when the per-world saving mode is disabled." eim.edit.armor.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to view PLAYERNAME's armour inventory in the world WORLDNAME, but only when the per-gamemode saving mode is disabled." eim.edit.gamemode.GAMEMODE.armor.world.WORLDNAME.owner.PLAYERNAME: description: "Gives permission to edit PLAYERNAME's GAMEMODE armour inventory in the world WORLDNAME."
Download
Download link for all files: http:dev.bukkit.org/bukkit-plugins/enteis-inventory-manager/files/ Download latest file(zip): http:dev.bukkit.org/bukkit-plugins/enteis-inventory-manager/files/11-1-7-2-enteis-inventory-manager-v0-5-zip/
Installation
Just drag both the jar file and the "Entei's Plugin Library.jar" from the download link into your server's plugins folder. Be sure to download the latest .zip/jars to get all of the required files!
Configuration
The config.yml file template is here, be sure to follow it:
# Important! Make sure this config.yml file's version setting matches the version of the plugin! version: "0.5" # This allows debugging messages to be sent to the console when the # plugin is being used. May spam console with many messages. # Default: false showDebugMsgs: false # Enable this if you don't want any worlds to share inventories, or # disable it if you do. # Enabling this disables the "Inventory Listing Section" entirely. # Default: true worldsHaveSeparateInventories: true # This tells the plugin that you want the players' inventories to be # separated by gamemode for each world. # Set it to true: inventories will be per-gamemode as well as your # setting of "worldsHaveSeparateInventories". # Set it to false: Default Minecraft behavior(gamemodes are ignored) # and your setting of "worldsHaveSeparateInventories". # Default: false loadByGameMode: false # The following is a new feature that allows you to be able to tell what item # belongs to which player. Set "enableItemOwnership: true" if you want # to enable this feature. # Set "saveItemOwnership: true" if you would like the ownership of items # to be saved after logout or server restart. # # Set "overwriteItemOwnershipOnObtain: true" if you want the ownership # of an item to be set as the player that obtains the item(even if the # item is owned by someone else). Setting this setting to false # and the first two settings to true will make all items have permanent # ownership settings until the item is crafted-with, used, # or destroyed. Dropping the item(or dying with it) will not reset the # ownership, so players who die will leave proof of ownership in their items, # so that if another player comes along to pick it up, you can # set "allowItemStealing: false" to prevent that player from 'stealing'. # Note that setting "overwriteItemOwnershipOnObtain: true" will # disable the "allowItemStealing" setting(by setting it to true automatically). # # Set "removeOwnerOnClick: true" to make the plugin remove your ownership # of an item whenever you pick it up with your cursor in any # inventory screen(it is automatically re-assigned when placing in your inventory). # "removeOwnerOnClick" is useful when you want to do a lot of drop parties easily. # # Set "autoItemOwnership: true" to have items placed or otherwise obtained # into a players' inventory become theirs. Note that this is different than # the "overwriteItemOwnershipOnObtain" setting, as this doesn't overwrite # other players' ownership. # Set "autoItemOwnership: false" if you want players to have to use the "/claimitem" # command instead. # Default: false enableItemOwnership: false # Default: true saveItemOwnership: true # Default: false overwriteItemOwnershipOnObtain: false # Default: false allowItemStealing: false # Default: false removeOwnerOnClick: false # Default: false autoItemOwnership: false # ================================================================================ # This is the message sent to the command sender if # they don't have permission to use the command they typed. # Default: "You do not have permission to use this command." noPermission: "You do not have permission to use this command." # This allows you to set whether or not player experience levels are # saved and loaded with the player inventories or not. # Default: true manageExp: true # This allows you to set whether or not player health is saved # and loaded with the player inventories or not. # Default: true manageHealth: true # This allows you to set whether or not player potion effects are # saved and loaded with the player inventories or not. # Default: true manageEffects: true # This allows you to have the plugin automatically update and save # all online players' effects every 30 seconds so that they don't # try to glitch the server and get more effect time. # Note that this can add more read/writes to your hard drive, # causing progressed eventual hard drive failure(if left on ridiculously long). # You can set this to true and then turn it off later by typing the following # into the console: "/eim deactivate30sectimer", or "/eim activate30sectimer" # to re-activate it again. # This only works if "manageEffects" is set to true. # Default: false updatePlayerPotionEffectsEvery30Seconds: false # This allows you to set whether or not player hunger and # hunger saturation levels are saved and loaded with the player # inventories or not. # Default: true manageHunger: true # This sets whether or not any player can view and edit their extra # chest inventory by default.(Command to use would be: "/view extra") # Default: false ownerCanEditExtraChestByDefault: true # Inventory Listing Section ------------------------------------------ # This is the number of lists that are shown below. # Setting this to a number lower than the amount of lists you set will # cause the plugin to ignore the lists past the number you set here. # On the other hand, setting this number higher than the amount of # lists shown below will cause the plugin to complain about you not # having listed each list past the actual amount of lists that you set. numberOfLists: 2 # Enter your worlds in the following format: # #list_#: "world1Name|world2Name" # # (Where '#' is the number of the list, in order from 1 to how many # lists there are, top to bottom. # Example: # #list_1: "pvpWorld|arenaSpleefWorld" #list_2: "spawnWorld|survivalWorld" # list_1: "world_a|world_c" list_2: "world_b"
Requirements
REQUIRED: Entei's Plugin Library(Also included with .zip file for your convenience) Note: After the first installation of the plugin library, you shouldn't need to update that when an update for the main plugin is released unless it is explicitly stated in that versions' description. That way you won't be having to handle as many files every time I update the plugin.
OPTIONAL: Vault(for using the awesome new /invperm command, which allows players to share their inventories with each other!)
Notes
This is a relatively new plugin, which uses my awesome https://github.com/br45entei/EnteisPluginLibrary/blob/master/Entei'sPluginLibrary/src/com/gmail/br45entei/enteispluginlib/InventoryAPI.java(which I have recently created!) as the basis for what is does. I hope you find it useful!
Notice: The plugin "Entei's Plugin Library.jar" does nothing on its own, as it is only what its name suggests - a library. It is required for this plugin to function correctly, as I have other plugins I am developing right now that also use the same resources as this one, so I decided to keep it simple and use a plugin library for my projects.
Notice: This plugin will most likely break/mess with other inventory-managing plugins, or produce strange bugs! If you would like me to add a feature that another plugin that is causing problems has, feel free to comment on the main page or contact me via e-mail at [email protected], and I'll get back to you as soon as I can!
Source
Note: Github source is currently outdated. The source repository for this plugin can be found here. The InventoryAPI's source can be found here.
If you use this plugins' source, be sure to give me some credit! There is a Bukkit Forum page on the InventoryAPI here.
Pull Requests
You can view this page for more information on pull requests. Thanks for contributing!
Debugging
If you would like to help out, or you're just curious, you can add in "showDebugMessages: true" to the config.yml to make the plugin spit out various detailed information about what's going on while it works. Beware, though, that on servers with more than two players online, the debug messages can bog the server down, or even crash it!
Thanks for viewing this page, and I hope you like my work!
I will definitely be working on this plugin in particular, but I'm not sure if I will update any of my other plugins, except maybe "Entei's Commands" which will become "SuperCmds"(I had been coding on it on my own without pushing to bukkit so that I could experiment and figure things out more, and now that it is sort of stable[last time I checked], I may consider updating it on here for you guys to use.)
Sorry to make you guys wait soooo long. You may not even need this anymore, but if you do, I promise I will have it out before the end of march, at the very least.
@NickGamerGR
That is very weird. It may have something to do with the library. I'll probably make this plugin stand-alone and only depend on things like vault, and maybe then these strange bugs will stop occurring.
@Meisterbetrieb
Ever since bukkit got dcma'd, I was kinda burned out of mc, but here lately I have picked it back up. I will work on getting this up-to-date and fixed in the coming weeks, and I may even add in more features, depending on what all has changed in bukkit/spigot.
Look nice. Waiting plugin to update for mc 1.8.1.
@bloodyxninjax
Hmm, that's rather odd. When I finally get around to updating all of my plugins to Mc 1.8, I'll look into it. It's most likely the Plugin Library as that has support for my chat plugin as well.
I got a problem. When I installed the plugin. It changed my ChatFormat? How can I fix this? Reply please!!!!!
@br45entei
Can I do that now, as long as players haven't logged in since the addition of the mod?
Also, how do I start it in backup mode?
@darkdemon42
Oh yea, sorry, it looks like I need to update the plugin page - When you go to install the plugin, you need to run it in backup mode to have the plugin import the player.dat files before running it in live mode, otherwise what happened to you will happen. I'm sorry that I didn't update the plugin page beforehand!
Just installed this, and it's cleared my players' inventory? It works after that fine, but whenever playing log in for the first time since I installed the plugin, they have to start fresh.
Is there any way to import the vanilla player.dat into your system so they keep their inventories from before I installed this?
@AielloBros
Thanks for letting me know, but I've already fixed that bug in my new version. I'm hoping to have it out by the end of this weekend :)
@br45entei
Every attribute doesn't save properly :P Whenever I switch into creative with it or come back to that world, when it gives me back my inventory the attributes are removed
@AielloBros
I am currently working on finishing and releasing version 0.56, but as of late I have been quite busy with other matters. However, I will be able to work on getting the new release out tomorrow, so hopefully it won't be too long before I can get the plugin updated for you! What item attributes in specific are not being saved? I suspect this glitch is due to the fact that my plugin library that this plugin requires was updated sometime last week, so it may have broken some functionality with the older version of this inventory plugin(version 0.5). If you would be so kind as to give me details on your issue, I would gladly look into it further and try to prevent future occurrences of it. Have a good day, and thanks for trying out my plugin!
My items with attributes are not being saved correctly :/ Anyway to fix it?
@br45entei Thanks. I had a cool idea to create an alternate world players could travel between, but I can't make any traders. XD. Makes it a little hard for other game mechanics I had planned to work. Is there a way to perhaps tell it to specifically ignore certain players? For instance, the trader's name is "NetTrader" so is there a command or something I could use to have it ignore that name?
@Tjehu
Oh really? Is the inventory's title any different? Sure, I can make the gui force-closing configurable, but I'm actually pretty deep into version 0.56, so once I get that uploaded you can try leaving the option off and see if it will still force close that screen. Thanks for asking!
Hello! I have been having a compatibility issue. I have Citizens 2 installed, as well as DtlTraders (an addon for Citizens) and this plugin renders it virtually unusable. What happens is you open the inventory, and the second you change something it yells "It looks like this player has left the server!" and forces the gui shut. Could you perhaps add a config line allowing the forcing gui to be prevented? Thanks!
@br45entei
Hello again :-)
I'm not sure where the error comes from, the nicknames some players have are set using Essentials's nickname command; /nick.
The maximum length of nicknames it is set to 15 characters, so imo that shouldn't be causing those errors.
And thanks for considering my request :)
@ThisUsernameIsMine
Hmm, okay, will look into the creative only lore as well :)
Also, several other peopel have pm'd me about the group rank requests and I'm currently working on that, so look out for version 0.6!
P.S. The error you are getting, is it only happening with players with long names? I haven't had any long names to test with lol
@br45entei
You're welcome, i'll let you know how things went asap! :-)
update: The library that's bundled with the previous version of your inventory plugin still causes exceptions when changing gamemodes, though a different one (and as far as i know this one isn't causing everyone to lag):
http://dev.bukkit.org/paste/9835/ (java.lang.IllegalArgumentException: Title cannot be longer than 32 characters)
edit: It would be nice if it was possible to only tag/protect items if they're obtained in/from creative mode, and possibly disallow/prevent creative players from picking up those untagged items.
I currently have a world with both survival and creative players and only want to tag/protect the items if they're obtained in/from creative, so that survival players are still able to trade their items with other survival players.