Example Config

⚙ Main

Enabled bool

A Quick way to disable the entire plugin.

Debug bool

Setting this to “true” will print a lot of debugging info to the console

Config Version Integer

Keeps track of the current config version, And will migrate it if required.

Grace bool|integer

How many seconds a player will be spared from being punished by BetterKeepInventory after dying. Setting this to false will disable it.

⚔ Items

The item section of the config is split up into three parts, just like your inventory. These three sections all share the same settings, But are configured individually. The sections are:

  • Hotbar
  • Inventory
  • Armor

Mode string

Has to be set to one of the following:

NONEIgnores items in this section (disables)
SIMPLEDeals a set amount of damage between min and max
PERCENTAGEDeals a percentage of the items durability based on min and max

Min integer

A Number between 0 and 100 to define the minimum amount of damage dealt.

Max integer

A Number between 0 and 100 to define the maximum amount of damage dealt.

Use Enchantments bool

Wether certain enchantments like Unbreaking should affect the amount of damage a tool receives.

Dont Break bool

Wether to always leave at least 1 use of the item left, Can be usefull if your items are meant to be repaired.

Ignored Materials Material[]

A List of materials that are ignored and will not take damage. Must be represented by a entry on this list: Material (Spigot-API 1.18.2-R0.1-SNAPSHOT API) (spigotmc.org)

📚 EXP

Minecraft Levels / Experience Points.

ignored_materials:
	- SHEARS
	- FISHING_ROD
	- CARROT_ON_A_STICK
	- FLINT_AND_STEEL
	- WARPED_FUNGUS_ON_A_STICK

Levels

Levels can be configured similarly to items.

Mode string

NONEDon’t lose any levels.
ALLLose all levels.
PERCENTAGELose a set amount of levels between min and max
levels:
    mode: "NONE"
    min: 0
    max: 0

Min integer

A Number between 0 and 100 to define the minimum amount

Max integer

A Number between 0 and 100 to define the maximum amount

Reset Level bool

if set to true current level progress will be lost.

🍗 Hunger

Mode string

NONEVanilla behavior: Respawn with a full hunger bar
KEEPKeep hunger level of death

Min integer

A Number between 0 and 20 to set the minimum amount of hunger to respawn with. Setting this to 6 will respawn players with a minimum of 3 hunger chunks.

Max integer

A Number between 0 and 20 to set the maximum amount of hunger to respawn with. Setting this to 8 will respawn players with a maximum of 4 hunger chunks.

🍸 Potions

Potion effects usually get removed after dying, but you can configure the plugin to keep some!

Kept Effects PotionEffectType[]

A List of Potion Effects that are kept and will be reapplied on respawn. Must be represented by a entry on this list: PotionEffectType (Spigot-API 1.18.2-R0.1-SNAPSHOT API) (spigotmc.org)

kept_effects:
    - ABSORPTION
    - DAMAGE_RESISTANCE
    - FAST_DIGGING
    - FIRE_RESISTANCE
    - HERO_OF_THE_VILLAGE

Max Duration bool|integer

Set tot a number to limit the effect to at most this value’s length in seconds. Set to false to keep original length.

Reduce Potency bool|integer

Set to a number to reduce the level of the effect by that much. Set to false to keep original effect level.

👛 Economy

Vault based economy.

amount integer

Reduce the players balance by this amount.

🎯 Overrides

Overrides are situations where BetterKeepInventory will NOT apply its effects. You can use these to prevent damage to things.

Override Values

You can use the following overrides:

ALLDisable Everything
ITEMSDisable all item damaging effects
ARMORDisable damage to equiped armor
INVENTORYDisiable damage to items in the Inventory
HOTBARDisable damage to items in the hotbar
EXPDisable loss of EXP
EXP_LEVELDisable loss of EXP Level
POTIONSDisable re-applying of potion effects
ECODisable loss of money
HUNGERDisable re-applying of hunger level

World Overrides

You can override based on the players world. You can also filter on specific kinds of damage.

overrides:
  worlds:
		world_no_pvp:
		  damage_types:
		    PVP:
	      - ITEMS
				- HUNGER

This example disables items & hunger for players that die to PvP combat in the world “world_no_pvp”

overrides:
  worlds:
		world_no_exp_loss:
	  -EXP
 

This example disables exp loss for players that die in the world “world_no_exp_loss”

Towny Overrides

You can also enable overrides based on Player Towns. You can specify direct town/nation names or, use one of these placeholders:

wildernessAny unclaimed land
any_townLand claimed by any town
player_townLand claimed by the town the player is a resident of
any_nationLand claimed by a town that belongs to any nation
player_nationLand claimed by a town that belongs to the same nation as the player’s town.

Player Town Example

overrides:
	towny:
	  enabled: true
	  towns:
	    player_town:
	    - ECO
 

Player’s don’t lose money in their own town

Specific Nation Example

overrides:
	towny:
		enabled: true
		nations:
			'The Empire':
			- ITEMS
			- HUNGER
 

Player’s don’t lose durability & hunger in a town that belongs to “The Empire” nation

Wilderness Example

overrides:
	towny:
	  enabled: true
	  towns:
	    wilderness:
	    - HUNGER
 

Player’s don’t hunger when they die in the wild.

Any Nation Example

overrides:
	towny:
		enabled: true
		nations:
			any_nation:
			- POTIONS
 

Player’s don’t keep potion effects in a town that belongs to any nation.