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_pickupsandno_dropsare 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_placeenabled, 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_placeenabled, 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.
-
View User Profile
-
Send Message
Posted Apr 13, 2014When putting on armor in creative mode and changing back to survival, the inventory changes but the armor is still in the armor slots
-
View User Profile
-
Send Message
Posted Apr 12, 2014@Lubenica998
Your average tick rate is 19.83 (out of a possible 20), so it doesn't look like you are experiencing much lag at all...
-
View User Profile
-
Send Message
Posted Apr 12, 2014This plugin is causing a lot of lagg :S
http://aikar.co/timings.php?url=7240623
-
View User Profile
-
Send Message
Posted Apr 11, 2014@MasterKohaku
You need to update CraftBukkit to 1.7.5 (use the latest dev build) - unfortunately it doesn't yet have a 1.7.5/1.7.6/1.7.7 option to choose from when uploading a file - everything from 2.4 onwards needs 1.7.5+
And please don't post server logs in the comments use a paste / paste bin or something similar. we are also not blind, excessive font sizes are just annoying.
-
View User Profile
-
Send Message
Posted Apr 11, 2014I have this problem... and is the only plugin in the folder plugin, why i have this problem?
Problem:
[02:22:25] [Server thread/ERROR]: Could not pass event PlayerGameModeChangeEvent to GameModeInventories v2.4 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at org.bukkit.craftbukkit.v1_7_R1.entity.CraftPlayer.setGameMode(CraftPlayer.java:749) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at org.bukkit.command.defaults.GameModeCommand.execute(GameModeCommand.java:64) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:175) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:683) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchServerCommand(CraftServer.java:670) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at net.minecraft.server.v1_7_R1.DedicatedServer.aw(DedicatedServer.java:286) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:251) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] Caused by: java.lang.NoSuchMethodError: org.bukkit.Bukkit.getPlayer(Ljava/util/UUID;)Lorg/bukkit/entity/Player; at me.eccentric_nz.gamemodeinventories.GameModeInventoriesXPCalculator.getPlayer(GameModeInventoriesXPCalculator.java:107) [?:?] at me.eccentric_nz.gamemodeinventories.GameModeInventoriesXPCalculator.<init>(GameModeInventoriesXPCalculator.java:97) [?:?] at me.eccentric_nz.gamemodeinventories.GameModeInventoriesInventory.switchInventories(GameModeInventoriesInventory.java:37) [?:?] at me.eccentric_nz.gamemodeinventories.GameModeInventoriesListener.onGameModeChange(GameModeInventoriesListener.java:70) [?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.7.0_13] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [?:1.7.0_13] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [?:1.7.0_13] at java.lang.reflect.Method.invoke(Unknown Source) [?:1.7.0_13] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks] ... 13 more
-
View User Profile
-
Send Message
Posted Apr 6, 2014@eccentricnz
Thanks! I'll be testing 2.4.3 though :-) +1
-
View User Profile
-
Send Message
Posted Apr 4, 2014Important information about UUIDs: http://dev.bukkit.org/bukkit-plugins/gamemodeinventories/#w-player-uuids
-
View User Profile
-
Send Message
Posted Apr 4, 2014@ThisUsernameIsMine
Now it does:
GMI v2.4.1
-
View User Profile
-
Send Message
Posted Apr 4, 2014@ThisUsernameIsMine
no_piston_movehasn't actually been implemented yet...-
View User Profile
-
Send Message
Posted Apr 2, 2014@eccentricnz
okay: in creative gamemode, when placing a piston and a certain item in front of it (e.g. a lever, button, etc.), the piston is able to make the item drop and be picked-up by anyone (i haven't tested it with droppers/dispensers yet).
This, while track_creative_place, break_no_drop and no_piston_move are enabled.
Hopefully its more understandable this time =P
-
View User Profile
-
Send Message
Posted Apr 2, 2014@ThisUsernameIsMine
Please make a ticket with some detail... what does transferred to survival even mean? I'll need a step by step process to follow so that I can prevent whatever it is you want to prevent.
-
View User Profile
-
Send Message
Posted Apr 2, 2014When placing a block for a piston, it can be 'transfered' to survival (no_falling_drops true doesn't prevent this).
I could choose to block pistons, but then i'm basically limiting creative player's choices for what they can build (there's another plugin for that: Limited Creative)
I'm not sure if the same counts for dispensers/droppers (oh, lets not forget those hoppers),
but do you think you can prevent this, without blocking their usage entirely? ;-)
-
View User Profile
-
Send Message
Posted Mar 31, 2014@eccentricnz
Thanks buddy! :-) +1
Anywho, is it possible to bypass gamemode inventory switching?
I assumed it was disabled for OPs by default, but even after adding the bypass node my inventory still changes accordingly =/ (could've been useful for Moderators/Admins too).
edit: Nevermind, got it working by adding a negated gamemodeinventories.use node.
imo, the bypass node should bypass all GMI restrictions/effects ;-)
-
View User Profile
-
Send Message
Posted Mar 30, 2014@ThisUsernameIsMine
GMI v2.3.2
no_dropsistruein the config then players in CREATIVE gamemode do not drop anything when they dieUploaded, awaiting Bukkit approval
-
View User Profile
-
Send Message
Posted Mar 30, 2014@ThisUsernameIsMine
None of those config options will apply for suicides, I'll look into it as time permits, and make sure they do
-
View User Profile
-
Send Message
Posted Mar 30, 2014I have:
no_drops: true
no_falling_drops: true
restrict_creative: true
But when a creative player suicides, the items are dropped and can be picked up by other (survival) players¿
-
View User Profile
-
Send Message
Posted Mar 29, 2014@mikeyriver
GMI 2.3.1 has been uploaded and is awaiting Bukkit approval - we're no longer cancelling the break event, so core protect should still pick it up.
-
View User Profile
-
Send Message
Posted Mar 28, 2014This plugin has a conflict with the core protect plugin. If the break no drop is true and if a player breaks a block placed in creative mode, core protect isn't able to detect who broke the block.
-
View User Profile
-
Send Message
Posted Mar 23, 2014@CappyT
2.3 is not compatible with 1.5.2 as it doesn't have horses... There is a reason it says R: GameMode Inventories 2.3 for CB 1.7.2-R0.3
-
View User Profile
-
Send Message
Posted Mar 23, 2014@eccentricnz
Having an error on 2.3, maybe you forgot something about Horses...
I'm running CB 1.5.2 R1.0 Here is the error log:
http://pastebin.com/8LeFssVm