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.
@baemboo
Black list works fine for spawn eggs, potions and experience bottles
No animals, golems, monsters (including Silverfish blocks), or Withers. Stop the server, add them to the config, start the server.
@ThisUsernameIsMine
Lawl, thanks. I stared at the config last night (was crazy tired) searching for that option..
The WorldGuard region flag "game-mode" is still an issue tho.
@MCCharlieCraft
config.yml > save_on_death: false
Is there a way to disable inventory saving on death. This is causing some conflicts with gamerule keepInventory true. In addition to other plugins that change gamemode, like WorldGuard regions that force gamemode.
When moving from creative to survival in a worldguard region flagged for survival, it will switch the players gamemode, but allow them to keep their creative inventories.
thanks for the fast update after my recent idea. id give you 5 bucks for some coffee if youd add the following:
While in creative: - Option to deny the usage of Potions and ExpBottle (i cant deny it with the blacklist) - Option to deny the usage of spawn eggs
Show the "You are not allowed to pick up items in Creative", "not allowed to drop..." and "Blocks that were placed in Creative dont give drops" messages only once every 60s to a player to avoid spam. I know that i can disable Messages completely, but id like to keep players Informed.
The last thing you could add is the option to rename "[GameModeInventories]" in the messages.yml to something shorter.
Thx!
@eccentricnz
With 18 players online I am already starting to see some significant improvements.
Before: (This is with only 8 pp online)
After: (This is with 18 ppl online)
@eccentricnz
Does the on piston extends event also ignore the don't track list?
@MCCharlieCraft
Yes it is on both the break and place events
@eccentricnz I am as well, but that all depends on what you mean by don't track.
The event that is hogging all the tps when lots of players are online is the on block break event.
If the don't track is only not tracking the on place, than it probably wont make much of a difference. It needs to ignore the don't track list on the break events.
I won't be able to get any real data until sometime in the evening tomorrow when there are more than 20 players online.
@MCCharlieCraft
I will be interested to see how much difference it makes...
@eccentricnz
Awesome! Awesome for the fast response, and awesome for the feature update. Double awesome!
@MCCharlieCraft
Try build #72: http://tardisjenkins.duckdns.org:8080/job/GameModeInventories/72/me.eccentric_nz.gamemodeinventories$GameModeInventories/
DIRT and STONE are disabled by default
Set to
dont_track: []
to track all blocksIs it possible to add a feature to turn off certain blocks being tracked with the creative tracker?
This plugin is very heavy with the on block break event, and doesn't really need to be listening to certain blocks like dirt, and stone. Being able to remove just those two blocks from the listener would really help speed up server tps.
The info above is when there is an average of 13 players online. When the server has more than 20 players the block break even goes above 100%.
@eliotsmithgt
Not really, to tell the truth I always run the plugin with almost everything DISABLED as I'm only interested in the inventory switching feature and none of the restrictions.
@Cluter123
It saves any inventory when they switch game modes and restores it when they switch back. If a player doesn't have permission to change game modes, then this plugin will not affect them.
@baemboo
GMI v2.7 now has a worlds list for
track_creative_place
- this is a BREAKING change please read the change log BEFORE installing - you have been warned!http://dev.bukkit.org/bukkit-plugins/gamemodeinventories/files/67-game-mode-inventories-2-7/
This plugin only saves the inventories of creative players into mysql right?
So if I remove this plugin, everyone in survival will still have their normal items?
I don't want this plugin logging everything a player does in survival because I'm using this for a creative world only
After about an hour or so there is always a spike in the plugins usage. The BlockPhysicsEvent spikes and the server's TPS drops considerably. Any idea why?
@madtomic
Most likely a bug specific to your server setup as a problem that major would have been picked up a long time ago... I suggest you check for plugin conflicts
I'm using v2.5.4 and I don't know if it effects the latest build.
Major bug:
Reload while player in game will let them get the other game mode inventory. Example: Play in survival and server reload and you will get everything from creative.