2.0.0
Compatibility Notice
BetterKeepInventory 2.0.0 is a complete rewrite of the plugin. This version introduces significant changes, so updating is only recommended if you're ready to re-learn and re-configure the plugin. Configuration files, for example DO NOT CARRY OVER. You must re-configure the plugin from scratch.
Why 2.0.0?
The old configuration system where you configure all the effects, and then enable/disable effects using overrides is... confusing and clunky at best while still feeling extremely limiting. With 2.0.0 I've introduced a new system that shouldn't be too difficult to grasp, but really lets you completely make the plugin your own.
Realistically, you should treat this like a new plugin and read trough the documentation.
Permissions
There are no more “bypass” permissions, if you still wish to use permissions to change behavior please check out Condition: Permissions below.
# Group node for player permissions
betterkeepinventory.player: true
betterkeepinventory.command.help: true
betterkeepinventory.version: true
# Group node for administrative permissions
betterkeepinventory.admin: OP
betterkeepinventory.command.help: true
betterkeepinventory.command.reload: true
betterkeepinventory.command.registry: true
betterkeepinventory.version: true
betterkeepinventory.version.notify: true
betterkeepinventory.reload: true
# Able to view the plugins version in the main command
betterkeepinventory.version: OP
# Get notified about new plugin versions
betterkeepinventory.version.notify: OP
# Show the main help menu
betterkeepinventory.command.help: true
# View the plugins registries
betterkeepinventory.command.registry: OP
# Reload the plugin config
betterkeepinventory.command.reload: OP
The bypass permissions are no more, You can now configure effects by using the Permission Condition by reading below.
Rules
Instead of defining a baseline and then overriding some behavior using overrides, the plugin now uses a rules system to determine it’s effects. What this means is that the plugin can be configured in ways that were impossible before, Below are some example snippets
# Take 10% durability damage on armor
armor_damage:
name: "Damage Armor"
enabled: true
effects:
damage:
mode: "PERCENTAGE"
min: 25.0
max: 25.0
dont_break: false
slots:
- "ARMOR"
items:
- "G:ARMOR"
A Rule that damages armor
# Drop valuables on death
drop_resources:
name: "Always Drop Valuables"
enabled: true
effects:
drop:
mode: "PERCENTAGE"
min: 25
max: 25
slots:
- "ALL"
items:
- "G:RESOURCES"
A rule that drops anything in the “resources” group. (Any ores, dusts, gems and ingots)
Effects
Effects are the new names for the previously configurable sections: items, inventory, armor, exp, hunger and eco. You configure them mostly the same but now under the effects property of a rule.
Effect: Damage
Damage is the new effect that combines the previous config entries inventory, hotbar and armor. Adding this effect lets you damage items in any specified slot and of any specified material (as long as it has durability).
A new mode has also been added *PERCENTAGE_REMAINING* which will damage based on percentage of remaining durability.
Effect: Drop
Drop is a new effect. It’ll let you determine if some items should still drop on death. This lets you add back some risk of item loss to your server. (For example: drop gold, keep the rest)
Effect: Exp
The effect for the old exp config entry. Has a new property called drop that will let you determine if the EXP should be dropped on the floor instead of deleted.
Effect: Hunger
The simplified effect for the old hunger config entry.
effects:
hunger:
min: 6 #Always respawn with at least 3 drumsticks filled
amount: 1 # Remove half a drumstick for dying
Conditions
Conditions is what gives rules the power to be really customizable. Conditions can be mixed & matched The following conditions can be used at this time:
Condition: Worlds
A list of world names (with wildcard support) where the player must be in one of to trigger the rule.
survival_only:
name: "Survival"
enabled: true
conditions:
worlds:
nodes:
- "world"
- "world_nether"
- "world_the_end"
- "arena_*"
effects:
# ...
Condition: Permissions
A List of permission nodes required to trigger the rule. You can require a user to NOT have a permission by prefixing it with a ! (for example !betterkeepinventory.bypass ).
Condition: Placeholder
Requires the PlaceHolderAPI plugin. Let’s you test a placeholder using multiple operators to make really specific conditions for effects.
example_placeholder_condition:
name: "Player first joined after 2024"
enabled: true
conditions:
placeholders:
1:
placeholder: "player_first_join"
operator: ">="
value: "1717790357452"
effects:
# ...
The placeholder condition has the following operators:
*EQUALS*,*NOT_EQUALS*,*CONTAINS*,*STARTS_WITH*,*ENDS_WITH*,*GREATER_THAN*,*LESS_THAN*,*GREATER_THAN_OR_EQUALS*,*LESS_THAN_OR_EQUALS*
Children
To make assigning certain conditions a lot easier, or to create more advanced setups you can add children to your rules. Children will only be triggered if the parent is enabled and passes it’s conditions
rules:
# Disable everything!
global:
name: "Global"
enabled: false
children:
drop_exp:
name: "Drop Experience"
enabled: true
effects:
exp:
mode: "PERCENTAGE"
min: 25.0
max: 25.0
drop: true
Update Notifications
BetterKeepInventory now supports update notifications! Anyone with the permission betterkeepinventory.notify will be eligible to receive these notifications.
There are a couple “channels” you can choose to subscribe to for update notifications
| Channel | Description |
|---|---|
| NONE | Do not check for updates. |
| SNAPSHOT | Receive a notification when any new dev-build is available |
| LATEST | Receive a notification when a new version is released |
| STABLE | Receive a notification when a version newer than the version installed is marked as “stable” |
A release is marked as stable a couple weeks after it is initially released and no influx of bug-reports have arrived. It is recommended for production servers to use stable builds
Customizable Messages
Before 2.0.0, the plugin was very limited in sending messages. The only time a message was sent was when the player lost money on death. This changes now with the introduction of messages.yaml .
New Messages
- Item drop notification
- Item damage notification
- exp drop notification
- exp lost notification
Example of the messages
If you don’t like these messages, you can disable them by setting them to an empty string (’’ ) in messages.yaml .
Developer API
A developer API has been added! please check the GitHub readme for information on how to use it. This will allow other plugins to add additional conditions & effects to BetterKeepInventory
Changes made in BETA 2
Configuration Changes
Slots & Items are now under a "filters" section in the rule config
damage:
MODE: PERCENTAGE
min: 5.0
max: 5.0
filters: # <-- New!
slots:
- INVENTORY
items:
- ALL
Name & Lore filters
name & lore filters have been re-added
Prefix with ! to negate the check (!Soulbound drops items that don't have a lore line "Soulbound")
drop:
mode: ALL
filters:
name:
- 'Neverlost *'
lore:
- '!Soulbound'
Misc & Bugfixes
- Fixed a bug where slots were not parsed correctly
- Fixed a bug where missing keys would apply rules from the default config
- Re-Added metrics
- Changed the default notify_channel to LATEST
- Updated dependencies
Changes made in BETA 3
Bugs Fixed
- Fixed a bug where Placeholder Conditions did not parse correctly
Misc
- Updated Dependencies
- Changed the snapshot format from
build numbertocurrent date + build count that day - Daily Snapshots now only get created if there are actual code changes.
What's Changed
- 2.0.0 by @BeepSterr in https://github.com/BeepSterr/BetterKeepInventory/pull/176
- Bump org.apache.maven.plugins:maven-compiler-plugin from 3.13.0 to 3.14.0 in /api by @dependabot[bot] in https://github.com/BeepSterr/BetterKeepInventory/pull/177
- Bump org.apache.maven.plugins:maven-compiler-plugin from 3.13.0 to 3.14.0 in /plugin by @dependabot[bot] in https://github.com/BeepSterr/BetterKeepInventory/pull/179
- Bump com.palmergames.bukkit.towny:towny from 0.101.0.2 to 0.101.2.1 in /plugin by @dependabot[bot] in https://github.com/BeepSterr/BetterKeepInventory/pull/178
- Bump com.palmergames.bukkit.towny:towny from 0.101.2.1 to 0.101.2.2 by @dependabot[bot] in https://github.com/BeepSterr/BetterKeepInventory/pull/181
- Bump com.palmergames.bukkit.towny:towny from 0.101.2.1 to 0.101.2.2 in /plugin by @dependabot[bot] in https://github.com/BeepSterr/BetterKeepInventory/pull/180
- Bump com.palmergames.bukkit.towny:towny from 0.101.2.2 to 0.101.2.3 by @dependabot[bot] in https://github.com/BeepSterr/BetterKeepInventory/pull/183
- Bump com.palmergames.bukkit.towny:towny from 0.101.2.2 to 0.101.2.3 in /plugin by @dependabot[bot] in https://github.com/BeepSterr/BetterKeepInventory/pull/182
- Bump org.apache.maven.plugins:maven-shade-plugin from 3.6.0 to 3.6.1 in /plugin by @dependabot[bot] in https://github.com/BeepSterr/BetterKeepInventory/pull/187
- Bump com.palmergames.bukkit.towny:towny from 0.101.2.3 to 0.101.2.4 by @dependabot[bot] in https://github.com/BeepSterr/BetterKeepInventory/pull/184
- Bump org.apache.maven.plugins:maven-compiler-plugin from 3.14.0 to 3.14.1 in /plugin by @dependabot[bot] in https://github.com/BeepSterr/BetterKeepInventory/pull/189
- Bump org.apache.maven.plugins:maven-compiler-plugin from 3.14.0 to 3.14.1 in /api by @dependabot[bot] in https://github.com/BeepSterr/BetterKeepInventory/pull/188
Full Changelog: https://github.com/BeepSterr/BetterKeepInventory/compare/1.6.2...v2.0.0