GameMode Inventories
Downloads
I'm too lazy to upload GMI files to Bukkit anymore, as builds are automatically created when the plugin is updated and changes pushed to GitHub.
For 1.18.x, please download GMI from the TARDIS Jenkins server: http://tardisjenkins.duckdns.org:8080/job/GameModeInventories/
Features
GameMode Inventories allows you to have separate inventories for Creative and Survival game modes (it also works for Adventure!).
- Inventories are saved and switched automatically
- Configurable option to save and restore inventories on player death
- Configurable option to also switch XP amount automatically (enabled by default)
- Configurable option to also switch armor automatically (enabled by default)
- Configurable option to also switch Ender Chest inventories automatically (enabled by default)
- Configurable option to restrict inventory opening for Chests, Ender Chests, Enchantment Tables, Anvils, Furnaces and Dispensers in CREATIVE game mode
- Configurable option to disable players dropping items from their inventories in CREATIVE game mode
- Configurable option to disable players from picking up items in CREATIVE game mode
- Configurable option to remove potion effects when switching from CREATIVE to SURVIVAL
- Configurable option turn off the plugin's messages which can get excessive when
no_pickups
andno_drops
are enabled - Configurable option to track the placement of CREATIVE gamemode placed blocks, then either: disable them from being broken, or, allow them to be broken but not drop anything - and also prevent pistons from moving them and deny the block dropping if the attached block is broken - this MUST be enabled for a world to work. You can specify a list of blocks you don't want to track as well
- Configurable option to prevents drops from falling blocks e.g. anvils, gravel, sand
- Configurable option to prevent the breaking of bedrock in CREATIVE, set to false to prevent breaks below Y<5 in all worlds, and Y>122 in the Nether
- Configurable blacklist of blocks that cannot be placed in CREATIVE (use Spigot Material names)
- Configurable blacklist of commands that cannot be used in CREATIVE
- Configurable option to preserve custom attributes when switching inventories (player and armour only)
- Configurable options to set which GMI features can be bypassed
- Configurable option to restrict spectator gamemode access
- Configurable option to switch to a creative world when changing to gamemode CREATIVE
- Localisable messages - edit messages.yml
- Support for using a MySQL database
Created in response to this plugin request: http:forums.bukkit.org/threads/separate-inventories-creative-survival.112187/
Featured in Curse's Minecraft Spotlights
How it works
Add the GameModeInventories.jar file to your server's plugins directory and start up the server. A config file will be created automatically with the default values.
Then all you have to do is switch game modes and your current inventory, armor and XP will be saved and your new game mode inventory will take its place.
What it doesn't do
GameMode Inventories is not a replacement for the Creative Control plugin:
- its primary purpose is an inventory management tool
- this is NOT likely to change anytime soon
- please stop asking
GameMode Inventories is an open sourced project, if you want to make the changes yourself, you are free to do so, as long as the plugin is released under the same license and conditions as GameMode Inventories.
Timings
Please do not bother posting timings for this plugin, here's why:
- See above
- I don't use any of the plugins' 'restriction' features
- You should expect to see GMI working hard if you have
track_creative_place
enabled, this is normal, after all, GMI is watching all your players all the time, and is keeping them all in line while not bothering you. Any server owner will eventually have a problem if he pushes his hardware too much, for example by running lots of heavyweight plugins. - If you do have a problem, the solutions are to either add more RAM/cpu power, re-prioritize your plugins to drop a few you don't desperately need, reduce your max players or seriously think about why you are letting your players have Creative gamemode at all (if you can't trust them not to abuse it, then don't let them have it, or set up a creative only world).
- Finally, don't expect SQLite to be able to handle big loads - if you are running this plugin on a server with
track_creative_place
enabled, you should probably be using MySQL as the GMI database provider
Commands/Configuration
There are several config options:
save_on_death: [true|false] xp: [true|false] armor: [true|false] enderchest: [true|false] remove_potions: [true|false] restrict_creative: [true|false] no_drops: [true|false] no_falling_drops: [true|false] no_pickups: [true|false] dont_spam_chat: [true|false] track_creative_place: enabled: [true|false] break_no_drop: [true|false] no_piston_move: [true|false] attached_block: [true|false] worlds: - world dont_track: - STONE - DIRT creative_blacklist: [true|false] blacklist: - TNT - BEDROCK - LAVA_BUCKET break_bedrock: [true|false] command_blacklist: [true|false] commands: - give - i - buy - sell custom_attributes: [true|false] bypass: inventories: [true|false] items: [true|false] blacklist: [true|false] survival: [true|false] commands: [true|false] restrict_spectator: [true|false]
You can enable/disable the options with a command (all options are available via tab completion):
/gmi save_on_death /gmi xp /gmi armor /gmi enderchest /gmi remove_potions /gmi restrict_creative /gmi restrict_spectator /gmi no_drops /gmi no_pickups /gmi dont_spam_chat /gmi track_creative_place /gmi break_no_drop /gmi attached_block /gmi break_bedrock /gmi creative_blacklist /gmi command_blacklist /gmi no_falling_drops /gmi custom_attributes /gmi bypass.inventories /gmi bypass.items /gmi bypass.blacklist /gmi bypass.survival /gmi bypass.commands
Permissions
There are four:
gamemodeinventories.use
Default: true - Allow players to have separate inventories for each game mode
gamemodeinventories.death
Default: op - Allow players to save their inventories on death, and restore them on respawn
gamemodeinventories.bypass
Default: op - Allow players to bypass inventory opening restrictions in CREATIVE (when restrict_creative: true
). Also allow players to bypass the no items drops / no item pickups restriction (when no_drops: true
or no_pickups: true
). As of version 2.5.4, you can configure which features can be bypassed:
inventories
- if true players can bypass not being able to open inventories in creativeitems
- if true players can bypass not being able to pick up and drop items in creativeblacklist
- if true players can bypass not being able to place and use restricted block and items in creativesurvival
- if true players can bypass being forced into survival gamemode when changing worldscommands
- if true players can bypass not being able to place and use restricted commands- If any of the bypass options are set to false, then nobody will be able to bypass them (regardless of whether they have the permission or not)
gamemodeinventories.admin
Default: op - Allow players to change config options
Source code
Dev builds
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.
In reply to amanamaguchi:
Make a ticket, describe exactly what the difference is between the new stacks and the old ones, as I don't have the paid version to test...
According to the RPGChest wiki https://github.com/spigot-gillesm/RPGChest-Premium/wiki/Key a key is just an enchanted (arrow_damage) item with custom display name and lore with the 'hide_enchants' item flag set. GMI will handle all those things without issues, so would need to know what else is different - perhaps the drops / shards option?
In reply to eccentric_devotion:
https://github.com/spigot-gillesm/RPGChest-Premium/issues/18
Cannot reproduce with a "key" like item stack.
How does the new forcefield feature work? I know how to turn it on and off, but can't figure out what it actually does. I still take damage, arrows don't bounce off, I still burn in fire, I still take fall damage, I still drown, regardless of if I'm near the exterior or not. It's not explained in the TARDIS Information System.
In reply to Forge_User_43264701:
GMI doesn't have a force field...
It's not a personal force field, it only works on other entities...
In reply to eccentric_devotion:
So sorry about that! I clicked a notification to read a comment someone posted. Didn't realize it moved me from TARDIS to GMI. I'll remove my comment if you want. How does it work on other entities?
In reply to Forge_User_43264701:
Pushes them back when they are in range of the force field effect.
Some discussion here: https://github.com/eccentricdevotion/TARDIS/issues/178
and here: https://github.com/eccentricdevotion/TARDIS/issues/197
In reply to eccentric_devotion:
Awesome, thank you. :)
Hecc seems like I talk a lot here.
This is just a suggestion IF possible.
-Optional in settings to disable/enable wither and/or iron golem spawning
-Something to fix the ability to shear a creative placed pumpkin to receive seeds
In reply to amanamaguchi:
Wither/Iron Golem spawning from creative placed blocks only or in general?
In reply to eccentric_devotion:
Creative placed blocks only.
Players are able to use creative to spawn in golems and withers and still get drops from them after kill.
General spawning I guess can be another option added if others just don't want players spawning them and have some natural spawning system for them. But that'll need to be configured by those server creators.
In reply to amanamaguchi:
Build #130 or higher: http://tardisjenkins.duckdns.org:8080/job/GameModeInventories/
Tripped me up for a bit as didn't realise there are two types of Wither Skeleton Skull (regular and wall) and was only checking for the first.
Can still build mobs in survival gamemode...
In reply to eccentric_devotion:
I did a timings report and this is the only message it gave with violations
Plugin: GameModeInventories v3.2.1 Event: me.eccentric_nz.gamemodeinventories.GameModeInventoriesListener::onGameModeChange(PlayerGameModeChangeEvent) Time: 49912594671 Count: 1 Avg: 49912594671 Violations: 998
Not sure what it means
In reply to amanamaguchi:
Never understand timings myself... is gameplay affected? If not I wouldn't worry.
In reply to eccentric_devotion:
remove_potions: true
Not sure if that one does it already, but if it does, its not working.
Add an option to remove potions, including EXP potions.
As show, I have the potion option set to true, yet players in creative mode are still able to use them.
In reply to amanamaguchi:
That setting is meant to remove potion effects a player has when switching from creative to survival, it doesn't stop creative players from drinking potions.
In reply to eccentric_devotion:
I guess what you want is to prevent creative players from applying splash potions and bottles of enchanting to survival players... you should be able to do that by adding all the potions to the blacklist.
creative_blacklist: true
blacklist:
- EXPERIENCE_BOTTLE
- SPLASH_POTION
- LINGERING_POTION
Hello! is it possible you can make this plugin work per-world as well?
I tested it in my survival world, went into creative mode, worked fine, but the moment i changed to a different world, then back, my survival items were all gone in that world :c
Hope you can point me in the right direction, thanks!
In reply to Steel_Dev:
Cannot reproduce, survival inventory is restored when teleporting back to survival world.
In reply to eccentric_devotion:
Weird. I'll give it another shot. Thanks for the reply!
1.15 update, bee related items can be obtained in survival from creative.
Bee nest for example