InventoryPlus
Redefining Player Inventories
Features
- Create a true RPG feeling by remodeling the inventory system through various settings!
- Full control over item pickups, item sorting and item creation!
- Disable/Lock unwanted inventory slots!
- Picked up items are getting forwarded to the next allowed slot!
- Assign items to a slot and blacklist or whitelist them, controlling and restricting its possible contents!
- Define slots as item-bins, deleting all items put in!
- Define slots as slot-switchers, switching the items of two different slots when clicked on! (useful for one-click weapon switching)
- Moving items from/into locked/not allowed slots is not possible!
- Dropping items from disabled slots is not possible!
- Custom /get command which behaves similar to the default /give, now skipping un-allowed slots!
- Custom messages, informing your players when a slot is not allowed for that item or if an item cannot be picked up!
- Fully configurable though detailed and easy-to-use configuration files, disable and enable the features you need!
How it works
Let's assume you want some realism on your Minecraft server, annoyed by players carrying around an inventory full of heavy loot, often multiple times their own weight. You want a change. This change is being brought here!
For instance, you could restrict your players inventories to only carry one sword at a time. It can be done through the included configuration file, in which you can define the behavior of each of the 36 different inventory slots. For each individual inventory slot, you can add items to a list. These items can now either be blacklisted (i.e. every other item than those in the list goes into the slot), or whitelisted (i.e. only the items listed fit into the slot).
Your players inventory is still a bit too big? You can even block a slot from any kind of usage, allowing NO items to be moved into that slot at all! Whether a slot is locked or the item trying to be placed into it is not allowed - Restricted items wont make their way into unwanted areas, no matter what.
Configuration
Config File with explanations: config.yml
Understanding the Slot Grid
The config file is very straight forward. First you are able to change some general settings, but for the most part just leave them on default. Underneath you find 36 different blocks of arguments, starting with "0" up to "35", while each number indicates the slot it is referring to in the inventory system.
Filling the Lists
Depending on what you want to achieve, you can either make the itemlist a blacklist or a whitelist. You need one row for each item you want to allow/forbid. Always use the default formatting: ID:MetaData
Most items don't have additional information, making their metadata value a zero. Some items, like log or dye, have multiple sub-types, defining color and/or type. In that case, you need to specify your needs by submitting the metadata value. Swords and pickaxes for instance have a constantly changing durability. If you just add 272.0 (stone sword) to your whitelist, only a fully repaired stone sword is included. If you want to include all possible sub types and durabilities, use the wildcard *. You do that by placing a * after the dot (example: 272.*).
If you don't know the exact Item ID, you can use the link below or use the command /ivitem while holding the item in your hand. You are going to get a suitable value ready to place inside the config, including durability!
You can get the item ID's (for blocks and items) here: Item ID list
Remember, if you want to have a fully working whitelist, also add air to the slot (0.*).
Help, my config doesn't work
The config will not work and the plugin will eventually break if you delete parts of it, or if you use whitespaces instead of tabs while editing! Please only modify true/false values. You can also add and delete values inside the "items:" lists.
The plugin works, you just have to get the setup right. Updating to a newer version may break your config file as well, some things might have changed. To make sure you can update safely, go to the files section on this page and click on the newest version. Any changes made to the config are listed there, just manually check for differences and correct them. If your config seems to be broken, reinstall the plugin and add your old values to the freshly generated configuration file.
You can also try to use the YAML Phraser, to check for formatting errors inside the config.yml.
Commands and permissions
/ivreload
Reloads the plugin
/ivitem
Prints ID.DURABILITY of the item currently hold in hand into the chat, suitable formatting the config file.
/get <item | item:data> [amount | player] [player]
This may seem a bit confusing, but it is actually way more handy than the default /give command, which, for instance, always asks to enter a player name, even if you are the one receiving the item..
The first argument <item | item:data> stands for the item you want to have. It can either be an ID, or an ID with Metadata attached to it, separated through a colon.
- Examples:
- /get 17 => gives 1x log to yourself
- /get log => gives 1x log to yourself
- /get 17:3 => gives 1x jungle log to yourself
The second argument can now either be the amount of items you want to have/give, or the name of the player you want to give something to. If you only enter a username, the amount will be one.
- Examples:
- /get 17 30 => gives 30x log to yourself
- /get log 30 => gives 30x log to yourself
- /get 17:3 30 => gives 30x jungle log to yourself
- /get 17 badeye => gives 1x log to a player (here: badeye)
- /get log badeye => gives 1x log to a player (here: badeye)
- /get 17:3 badeye => gives 1x jungle log to a player (here: badeye)
The third argument is only relevant when the second argument hasn't already used the username parameter but the item amount instead.
- Examples:
- /get 17 30 badeye => gives 30x log to a player (here: badeye)
- /get log 30 badeye => gives 30x log to a player (here: badeye)
- /get 17:3 30 badeye => gives 30x jungle log to a player (here: badeye)
Bugs
- Shift clicking an item is 'ghosting' it to its original destination for a brief moment. This is not a big deal, it just doesn't look as fancy as it could look. It is caused by the bukkit API and cannot be fixed on my end.
- /get doesnt check for creative mode
- Equiping armor through shift clicking doesn't work yet
Upcoming Features
- Carry weight for specific items => slowness
- Crafting slot management
- In-game inventory restriction editing through a custom gui -> config wont be needed anymore for the slot configuration
- MultiWorld support
I would like to see it useable for restriction per WorldGuard claim.
@Nstemp
Added a new version with custom player feedback messssages on click, you can edit them inside the config. You can also disable messages completly, aswell as setting the colo of the message. These features came with 1.3, I've already uploaded it but bukkit is very.... well, you cant realy say when the file will get the approval, it's like naming the date of armageddon - impossible :)
@maxlehot1234
Okay I've did the same but for me it seems liek it works.... which bukkit version (the exact version, sso with R build aswell) and do you have other plugins installed? If so, which plugins?
@Nstemp
Nice idea, there is the debug options for the moment, but the values are very unorganized and abiscly just outputs for me at the moment. The feature "debug: true" will be just like you requested, maybe with custom messages which you can set in the config.
Still working on 1.3, I have some stuff to manage in real life so it's going to come out in either a few hours or tomorrow at 3pm GMT+1
Feature request:
Send a customizable message to the player when the item he's trying to move/drop/pick is blacklisted or not whitelisted, or locked. This would be useful for players who don't know whether the slot is locked or what items it has white/blacklisted.
I found a bug...
When i lock the first and and the second slots and i click on E to open inventory, i have this error: http:pastebin.com/DkzWKUHq
Add a reload command and permission for it.
@xXBadeye Hmmm, I kind of like the idea of just maybe blocking off the item drop completely and you can customize it some how... Or maybe like if a item is in a certain hotbar slot you can't drop it.
@xXMineFortressXx
You mean blocking the item drop completly for a specific item, regardless if the slot is locked or not, with an extra list for blocked drops?
@Nstemp
Okay, thanks for the feedback. I'll try to fix that. Just be patient, it takes a while to test everything out and figure out the exact problems and their solutions. My first goal was just to make a first stable build with some features.
You can test out the first version of this plugin (1.0). 1.1 has some serious problems with the black/whitelist, so don't use it. If 1.0 has no item forwarding on pickup, but you can test if your droping/inevntory moving works with it, than i'll just add my current modifications to the 1.0 to make it work.
IMPORTANT Whitelisting WORKS, but you have to add "- AIR" to your itemlist if you have blacklist set to false.
That way those slots work perfectly (with 1.2)
I think there's a bug when picking up items. I have slots with some items in whitelist and it seems everything locked (it isn't in the config) every slot has a whitelist and even with an item whitelisted it's like it's locked, I can't drop it or move it. Also when I pick up an item it goes to the first slot avaible despite the item isn't whitelisted and then happens the same, I can't move it or drop it from inventory but I can drop it with "Q".
Awesome job!
I've been looking for a plugin like this forever. I've been wanting a plugin that will lock a compass into a user slot on my server. The compass teleports them on Creative and Survival servers, and I couldn't find anything without locking the whole inventory. Can't wait to test this out!
Nice plugin! I just have another suggestion, maybe add it so that you can't drop a certain item in your inventory?
@cancabron
The blacklist was broken with 1.1, just realized it after experiemnting a long time with the item pickups :/ I'll upload 1.2 soon after I've fixed the blacklist function on Inventory click back to normal :)
Downloading!