Place Keep Inventory in the Players' hands.
- Java 8 or newer
- Minecraft 1.16.5 or newer (this pluign supports all versions after this, including 1.21.3 and etc...)
- Paste the .jar file you download into your server's plugins directory (ROOT/plugins)
- Fully restart your server
- Execute commands as necessary either by reading
COMMANDS
or by readingCOMMON SITUATIONS TO SETUP
If you make no changes to the default configuration, this will happen:
- All players will lose their inventory on all worlds, regardless of the KeepInventory Gamerule.
- However, the player can choose to keep their inventory with the
/ki
command. - You should probably read this documentation to see how you can configure this plugin to suit your needs, unless you want this to happen.
To set keep inventory on all worlds (giving the player a choice), run:
/ki setdefaultkion #default yes
To not give the player a choice whether they keep their inventory, run:
/ki setrunson #all no
/gamerule keepInventory true
Note that this method effectively disables the plugin.
For example, let's say I have two worlds: pvp and survival. I want the player to always keep inventory on pvp, but have a choice on survival (but default to no). We would run the following:
/ki setrunson #all no
(shut off plugin)/gamerule keepInventory true
(run this on pvp)/ki setrunson survival yes
(allow to run on survival)/ki setdefaultkion survival no
(set default to no on survival.)
- keepchoice.use - Meant for standard players; Allows the player to change their own keep inventory status on worlds where admins have set it to be allowed.
- keepchoice.admin - Meant for admins; Allows configurations of the plugin and changes for other players.
- /keepinventory [world] [player]
- Requires
keepchoice.use
permission for world and base - Requires
keepchoice.admin
permission for player argument - If neither world nor player is specified, the player who executed this command has their Keep Inventory status toggled for their specific world.
- If only a world is specified, the player who executed the command's keep inventory status will be changed for the precise [world] they provided
- If both a world and a player is specified, the [player]'s setting for [world] will be toggled.
- Requires
- /keepinventory help
- Requires no permissions
- Displays the help menu
- Help menu will be customized depending on whether the player has permission or not.
- /keepinventory reload
- Requires
keepchoice.admin
permission - Reloads configuration from the config.yml file on the server's filesystem
- Use it when you want to update changes you have made manually.
- Requires
- /keepinventory info
- Requires
keepchoice.admin
permission - Lists information about per-world configuration
- Includes Default
- Example output:
World default: no
(shows that the default is to have no keep inventory)
- Requires
- /keepinventory list
- Requires
keepchoice.admin
permission - Lists information about per-player configuration
- Shows each user's request for each world
- Warning: Can produce long output!
- Requires
- /keepinventory setrunson <yes|no>
- Requires
keepchoice.admin
permission - Sets if the plugin is allowed to run on (either yes or no)
- If disabled, Minecraft will obey the KeepInventory gamerule.
- If enabled, Minecraft will obey either the default or per-world configuration you have set with this plugin.
- Requires
- /keepinventory setdefaultkion <yes|no> [force]
- Requires
keepchoice.admin
permission - Sets the default keep inventory value for new players on (either yes or no)
- if force is specified, all players, regardless of when they joined will have their setting changed to reflect the setting chosen here.
- Requires