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.
@ThisUsernameIsMine
Have you tried testing on a fresh server with the same plugins? Is Essentials the updated version for 1.8 from the Spigot site? Were you using Carbon prior to updating to 1.8? Could GMI be conflicting with another plugin?
EDIT: Doing a Google search, I have seen a couple of other plugins with the same error (CoreProtect, Multiverse-Inventories) and it seems to be caused by the updating of one of the internal libraries contained within the Spigot jar. I'll investigate further after work.
EDIT 2: Actually Multiverse-Inventories also will do gamemode based inventories - it's just not configured that way by default - and it seems to be having the same issues as GMI
@eccentricnz
I'm sorry, i noticed that custom_attributes was already set to 'false' before the problems occurred :-(
Since GMI is the only plugin that enables gamemode-specific inventories i really hope this can be fixed at some point in time...
Is there any way to debug/monitor most (if not all) mechanics/aspects of a plugin?
I'm pretty noob to this but i really need to find some sort of workaround for this before more will abuse this bug/glitch on my server :-/
@eccentricnz
will do and report back to you asap ;-)
@ThisUsernameIsMine
Still can't reproduce:
Try turning custom_attributes off -
/gmi custom_attributes
Hmm, this is getting pretty serious.
With the new build (2.5.5) the same thing is happening and when it does the inventory doen't change when they go to survival mode (they keep their creative inventory in survival mode).
- http://dev.bukkit.org/paste/11082/
@eccentricnz
That's really awesome, buddy! I didn't expect you to push out an update that fast.
Much appreciated! (looking forward to the perms update :-) )
@ThisUsernameIsMine
GMI 2.5.5 seems to be working OK... no errors on my test server.
I'll see if I get time to do the permission today sometime.
Just a heads up: 2.5.4 causes a NPE when doing /gamemode 3 under Spigot 1.8-R0.1
- http://dev.bukkit.org/paste/11075/
Also: Can you add a permission node for gamemode 3? Essentials shares one permission for all gamemodes, which i find a downside when restricting gamemodes for specific players/groups. /gamemode 3 is really useful for inpecting areas and/or players without interfering anyone but imo it shouldn't be available to all players.
@dvargas135
I have no idea what you are on about...
Hello, Could you please make the creative players put in one group? Compatible with pex please
@bloxxerman101
Block the use of experience bottles:
@bloxxerman101
Please edit your post and put the error log in a paste - then I'll take a look at it
GMI does not give XP to any players, it only switches what they already have...
Please help! Some how, people with creative only are randomly getting thousands of XP levels and I'm unaware of how.
Console error:
25.11 21:09:39 [Server] INFO ... 23 more 25.11 21:09:39 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:298) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:606) [?:1.7.0_60] 25.11 21:09:39 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.7.0_60] 25.11 21:09:39 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [?:1.7.0_60] 25.11 21:09:39 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.7.0_60] 25.11 21:09:39 [Server] INFO at me.eccentric_nz.gamemodeinventories.GameModeInventoriesListener.onGameModeChange(GameModeInventoriesListener.java:74) [?:?] 25.11 21:09:39 [Server] INFO at me.eccentric_nz.gamemodeinventories.GameModeInventoriesInventory.switchInventories(GameModeInventoriesInventory.java:203) [?:?] 25.11 21:09:39 [Server] INFO at me.eccentric_nz.gamemodeinventories.GameModeInventoriesXPCalculator.setExp(GameModeInventoriesXPCalculator.java:131) [?:?] 25.11 21:09:39 [Server] INFO at me.eccentric_nz.gamemodeinventories.GameModeInventoriesXPCalculator.setExp(GameModeInventoriesXPCalculator.java:147) [?:?] 25.11 21:09:39 [Server] INFO at me.eccentric_nz.gamemodeinventories.GameModeInventoriesXPCalculator.getXpForLevel(GameModeInventoriesXPCalculator.java:203) [?:?] 25.11 21:09:39 [Server] INFO Caused by: java.lang.IllegalArgumentException: Level 105112 > hard max level 100000 25.11 21:09:39 [Server] INFO at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:734) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:81) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:186) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:65) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:880) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:1043) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:767) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at com.earth2me.essentials.Essentials.onCommand(Essentials.java:380) [Essentials.jar:?] 25.11 21:09:39 [Server] INFO at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:505) [Essentials.jar:?] 25.11 21:09:39 [Server] INFO at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:149) [Essentials.jar:?] 25.11 21:09:39 [Server] INFO at com.earth2me.essentials.commands.Commandgamemode.run(Commandgamemode.java:76) [Essentials.jar:?] 25.11 21:09:39 [Server] INFO at com.earth2me.essentials.PlayerExtension.setGameMode(PlayerExtension.java:16) [Essentials.jar:?] 25.11 21:09:39 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer.setGameMode(CraftPlayer.java:794) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:494) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:509) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:39 [Server] INFO org.bukkit.event.EventException 25.11 21:09:39 [Server] ERROR Could not pass event PlayerGameModeChangeEvent to GameModeInventories v2.5.4 25.11 21:09:36 [Server] INFO [HowAboutNo]Grunzythepotato: and i still dont have them 25.11 21:09:36 [Server] INFO [/WarpJMX]Jace_Xanthos: the creative glitch and the xp glitch 25.11 21:09:32 [Server] INFO [Gamer]Max: Did the server blow up yet? 25.11 21:09:30 [Server] INFO ... 23 more 25.11 21:09:30 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:298) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:606) [?:1.7.0_60] 25.11 21:09:30 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.7.0_60] 25.11 21:09:30 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [?:1.7.0_60] 25.11 21:09:30 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.7.0_60] 25.11 21:09:30 [Server] INFO at me.eccentric_nz.gamemodeinventories.GameModeInventoriesListener.onGameModeChange(GameModeInventoriesListener.java:74) [?:?] 25.11 21:09:30 [Server] INFO at me.eccentric_nz.gamemodeinventories.GameModeInventoriesInventory.switchInventories(GameModeInventoriesInventory.java:203) [?:?] 25.11 21:09:30 [Server] INFO at me.eccentric_nz.gamemodeinventories.GameModeInventoriesXPCalculator.setExp(GameModeInventoriesXPCalculator.java:131) [?:?] 25.11 21:09:30 [Server] INFO at me.eccentric_nz.gamemodeinventories.GameModeInventoriesXPCalculator.setExp(GameModeInventoriesXPCalculator.java:147) [?:?] 25.11 21:09:30 [Server] INFO at me.eccentric_nz.gamemodeinventories.GameModeInventoriesXPCalculator.getXpForLevel(GameModeInventoriesXPCalculator.java:203) [?:?] 25.11 21:09:30 [Server] INFO Caused by: java.lang.IllegalArgumentException: Level 105112 > hard max level 100000 25.11 21:09:30 [Server] INFO at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:734) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:81) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:186) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:65) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:880) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:1043) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:767) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986] 25.11 21:09:30 [Server] INFO at com.earth2me.essentials.Essentials.onCommand(Essentials.java:380) [Essentials.jar:?] 25.11 21:09:30 [Server] INFO at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:505) [Essentials.jar:?] 25.11 21:09:30 [Server] INFO at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:149) [Essentials.jar:?] 25.11 21:09:30 [Server] INFO at com.earth2me.essentials.commands.Commandgamemode.run(Commandgamemode.java:76) [Essentials.jar:?] 25.11 21:09:30 [Server] INFO at com.earth2me.essentials.PlayerExtension.setGameMode(PlayerExtension.java:16) [Essentials.jar:?] 25.11 21:09:30 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer.setGameMode(CraftPlayer.java:794) [spigot.jar:git-Spigot-1.7.9-R0.2-205-g2c31986]
@cuddyier
turn off
track_creative_place
See my comment here: http://dev.bukkit.org/bukkit-plugins/gamemodeinventories/?comment=412
My timings look like this: http://timings.aikar.co/?url=9130504
How do I stop gamemode inventories bringing up the piston event so much causing the TPS to drop to 10?
Also put the oped or bypass perm to be able to do the blocked commands :)
and the pistons don't move :P do i change that from the config or and command?
@eccentricnz
Ty finnaly xD
@eccentricnz
Nice update (+like) :-)
Though, i still favor seperate permission nodes to bypass limitations.
That way i'm able to add specific bypass nodes for my moderators (but don't let them bypass everything), and let admin+ bypass everything.
@CrazyPoloxD
New file uploaded :)
@eccentricnz
i mean with the blacklisted items how can i prevent that? Op's to use all the items, it doesn't work :P