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 Aug 29, 2014Hi! I think you're doing a great job at developing and releasing this plugin. The only thing wrong that I unfortunately had one of my players find out today was that (yes, I have it to where players cannot open containers) he could open a furnace that was smelting something and place an item in it, resulting in another player in survival obtaining that item through the smelting furnace. I tried looking to where I could fix it myself but I have never developed a plugin and it got quite confusing for me. I don't know if it is just me, but I have the latest version of this mod (2.5.2) and a version of 1.7.9 Bukkit (too lazy to check at the moment, but if you need the version I'll have to look around in the files) if it matters. If it's not just me, I would appreciate it if you could patch this in the next update to your plugin :)
(Summary, People can open Lit/Smelting Furnaces in Gamemode 1 and "smuggle" items to others that way)
-
View User Profile
-
Send Message
Posted Aug 29, 2014@JHarris1234
Can you try build #47 from the Jenkins server linked above - I have added CoreProtect logging for when
break_no_drop: true-
View User Profile
-
Send Message
Posted Aug 29, 2014Hi, I have it so people can break creative blocks but they don't drop items. However, if someone breaks a block that was placed in creative, core protect doesn't show it in the logs so we can't see who griefed.
-
View User Profile
-
Send Message
Posted Aug 26, 2014@XxGAM3RxFREAKxX
Negate the
gamemodeinventories.usepermission, how you do that depends on your permissions plugin:gamemodeinventories.use: falsefor PermissionsBukkit- -gamemodeinventories.usefor others-
View User Profile
-
Send Message
Posted Aug 26, 2014Love this plugin! Just cant figure out one thing! How do you set it up were if you wonted someone to be able to bypass changing inventorys all together!? So Admins and Owners dont switch inventorys at all. Even when they change gamemodes.
-
View User Profile
-
Send Message
Posted Aug 24, 2014@GlitchFinder01
-
View User Profile
-
Send Message
Posted Aug 24, 2014How do you make it so that players in survival can break blocks placed in creative but dont get drops from them?
-
View User Profile
-
Send Message
Posted Aug 18, 2014@FadeAwayXD
http://dev.bukkit.org/bukkit-plugins/gamemodeinventories/#w-commands-configuration
-
View User Profile
-
Send Message
Posted Aug 18, 2014What is the permission/config to make it so players can't drop items in creative mode?
-
View User Profile
-
Send Message
Posted Aug 11, 2014@lostINParadies
-
View User Profile
-
Send Message
Posted Aug 11, 2014And my inventories never saved wehn I switch from gamemode 1 to gamemode 0
I don't know why it don't work....
-
View User Profile
-
Send Message
Posted Aug 11, 2014okay and what mean this:
[08:54:10 INFO]: lostINParadies issued server command: /gm 1 [08:54:10 ERROR]: Could not pass event PlayerGameModeChangeEvent to GameModeInventories v2.5.2 org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:36) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer.setGameMode(CraftPlayer.java:777) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at com.earth2me.essentials.commands.Commandgamemode.run(Commandgamemode.java:76) [Essentials.jar:?] at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:182) [Essentials.jar:?] at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:510) [Essentials.jar:?] at com.earth2me.essentials.Essentials.onCommand(Essentials.java:385) [Essentials.jar:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:701) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerConnection.java:956) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:817) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java:28) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat.java:47) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
Caused by: java.lang.NullPointerException
at me.eccentric_nz.gamemodeinventories.GameModeInventoriesInventory.switchInventories(GameModeInventoriesInventory.java:59) [?:?] at me.eccentric_nz.gamemodeinventories.GameModeInventoriesListener.onGameModeChange(GameModeInventoriesListener.java:73) [?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.7.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [?:1.7.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [?:1.7.0_51] at java.lang.reflect.Method.invoke(Unknown Source) [?:1.7.0_51] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] ... 23 more
-
View User Profile
-
Send Message
Posted Aug 9, 2014@lostINParadies
No idea, repair your hard drive?
-
View User Profile
-
Send Message
Posted Aug 9, 2014Hallo,
I have a error in my log
Could not save inventory on gamemode change, java.sql.SQLException: [SQLITE_IOERR] Some kind of disk I/O error occurred (disk I/O error)
How i can fix that?
thanks, lostINParadies
-
View User Profile
-
Send Message
Posted Aug 9, 2014@bloxxerman101
The
enderchestsetting is for separate enderchest inventories per gamemode - remember this is NOT a creative control plugin, it is an inventory manager...restrict_creativewill prevent enderchest access-
View User Profile
-
Send Message
Posted Aug 9, 2014How do I disable people from using enderchest and chests while in creative? I set it to false/true and it still lets them do it. Please help.
-
View User Profile
-
Send Message
Posted Aug 9, 2014@ZachBail
GMI 2.5.2 should be fine with 1.7.9-R0.1
-
View User Profile
-
Send Message
Posted Aug 9, 2014Thanks so much @ZachBail!
-
View User Profile
-
Send Message
Posted Aug 9, 2014@ bloxxerman101
You only have to block the parent block. To block all spawn eggs just put this in:
No animals, golems, monsters (including Silverfish blocks), or Withers.
-
View User Profile
-
Send Message
Posted Aug 8, 2014Hi eccentricnz,
I really appriciate the option to turn off bedrock breaking and the jukebox fix. Just noticed when I went to update. Really cool of you man.
That whole deal Topo was talking about was the third thing in my last post. It's an exploit that became possible once you updated to allow the pistons to move with creative placed blocks on front of them. I haven't tried lately but it seemed for a while, that the "no-piston-move" option didn't stop the pistons from moving.
If it does work, then you're all set. He just needs to turn that on to solve his problem.
Does GMI 2.5.2 for CB 1.7.9 RO.2 work with CB 1.7.9 RO.1? I'm building a new spigot server and that's as far as I can go so far. If not, no big deal, I'll just use 2.5.1 (The ZachBail Update) lol
Thanks Man and Great Work!