Fixed NPE when gamerule keepInventory set to true.
Added new events API
Fixed item search logic: now plugin will search for the item with the highest priority among permission & physical & virtual and consumes in order of permission > physical > virtual.
Fixed an issue that may throws InvalidConfigurationException when loading the configuration files in some servers.
Note: If you meet the error like this:
Code (Text):
org.bukkit.configuration.InvalidConfigurationException: unacceptable code point '?' (0x9A) special characters are not allowed
in "'string'", position 223
Try to update your plugin and remove the broken configuration files.
Multiple items support. The item with highest priority will be consumed first.
Allow to use PlaceholderAPI placeholders in death / respawn commands.
Now hunger level / saturation level can be customized.
Add Compatibility Mode (only for the plugin can not work properly)
Hex color code support. (You can add hex code (eg: #FFFFFF) to messages directly now)
Configuration files now will be generated dynamicly.
Improved code.
Fixed the items will be consumed abnormally
Some bugs get fixed.
i18n support
This update have changed the structure of configuration files. You will need to check them out after updating. Configuration files will be backup and updated automatically when you update the plugin.
Now can remove items with special lore on death. (That's helpful if you are using plugins like SoulBind that will give the item repeatedly when a player respawns.)
Add a DEBUG OPTION that can show the death cause of a player.
You will need to add following contents in config.yml before update (refer to the latest configuration file)! Add to settings group:
Code (YAML):
show-death-cause-on-death: false
#Show the death cause of a player in console. (Debug option) items-with-lore-to-be-removed-on-death: #Items with this lore will get removed on death. #This works if you are using SoulBind plugin that will give the item repeatedly when a player respawns. - 'Soul bind item lore'
- '&dSoul bind'
Now you can filter entities type and custom name.(Both blacklist and whitelist mode are supported.)
Fix an issue that may cause NullPointerException.
You will need to add following contents in front of enabled-death-type in config.yml before update!
Code (YAML):
filter-entities-list: #if set to true (Blacklist mode), the inventory will NOT BE RESTORED if a player killed by the entity in the list. #if set to false (Whitelist mode), the inventory will BE RESTORED if a player killed by the entity in the list. is-blacklist: true
#To disable, leave the list empty. -> entities: [] #Entity name should be the namespace of minecraft. #For example: MAGMA_CUBE, PLAYER, ENDER_DRAGON, ZOMBIE, ZOMBIE_VILLAGER, etc. #You can find it out here: https://minecraft-ids.grahamedgecombe.com/entities entities: - ENDER_DRAGON
filter-entities-name: #if set to true (Blacklist mode), the inventory will NOT BE RESTORED if a player killed by a entity which name is in the list. #if set to false (Whitelist mode), the inventory will BE RESTORED if a player killed by a entity which name is in the list. is-blacklist: false
#To disable, leave the list empty. -> names-list: [] names-list: - 'Custom Entity Name'
- '&7Full name with&a color code'
New PlaceholderAPI variable: %inventorykeeper_amount_PlayerName% - Returns the virtual key amount of other players. (Only for online players.)
Now supports executing commands when a player died (Inventory items dropped).
Now supports death check. Now 'Saving stick' will only work when the specific death type enabled.
You will need to add following contents in settings group in config.yml before update!
Code (YAML):
#Execute commands if player inventory drops on death. run-commands-on-death-if-drops: - 'eco take
%player% 50' - '
[OP
]fly off'
#Execute a random command group if player inventory drops on death. run-random-commands-on-death-if-drops: - '10|50|eco take
%player% %random%;tell %player% You lost %random%coins!' - 'tell
%player% You died!' #Execute commands if player inventory drops on respawn. run-commands-on-respawn-if-drops: - '10|40|eco take
%player% %random%' #Execute a random command group if player inventory drops on respawn. run-random-commands-on-respawn-if-drops: - '15|90|effect
%player% minecraft:nausea %random% 0' #The following are the settings for the effective death types #When a death type is set to true, the inventory will be restored if the player died from this death type #If set it to false, the saving stick will not work. #For a detailed explanation of death types, see https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html enabled-death-type:
CONTACT: true
LAVA: true
CRAMMING: true
ENTITY_SWEEP_ATTACK: true
FIRE_TICK: true
ENTITY_EXPLOSION: true
WITHER: true
FIRE: true
MAGIC: true
PROJECTILE: true
CUSTOM: true
FALL: true
SUICIDE: true
DRAGON_BREATH: true
DROWNING: true
LIGHTNING: true
FALLING_BLOCK: true
FLY_INTO_WALL: true
THORNS: true
ENTITY_ATTACK: true
BLOCK_EXPLOSION: true
HOT_FLOOR: true
STARVATION: true
VOID: true
PVP: true
Now players with permission inventorykeeper.keep (Default:OP) can restore their inventory while the item will not be consumed.
To clear the items with enchantment curse of vanishing when the player dies, you can set clear-vanishing-curse-items to true.
To drop the items with enchantment curse of binding when the player dies, you can set drop-binding-curse-items to true.
You will need to add following contents in settings group in config.yml before update!
Code (YAML):
clear-vanishing-curse-items: true
#Clear items with curse of vanishing when player dies. # Only for 1.11+! drop-binding-curse-items: false
#Drop items with curse of binding when player dies. # Only for 1.11+!
This update includes some changes in config.yml! To update the plugin, you need to add the following text in the "messages" group.
Code (YAML):
received-virtual-item: '&aYou just received &dx
%amount% &eSaving Stick &a,now you have &e%total% &asticks!' set-virtual-item: '&aSuccessfully set the virtual amount of player &e
%p&a, now the amount is&ex%total%&a.' take-virtual-item: '&aSuccessfully took &ex
%amount%&a virtual item from &e%p&a,now has &ex%total%&a!' give-virtual-item: '&aSuccessfully gave &ex
%amount%&a vitrual item to player &e%p, &anow the total amount is &e%total% &a!' modified-amount: '&eYour virtual &bSaving Stick &ehas been modified, now you have &6x
%amount%.' virtual-item-count: '&aYou have &dx
%amount% &eSaving Stick&a!' virtual-item-count-others: '&aPlayer &6
%p &ahas &dx%amount% &eSaving Stick&a!' give-usage: '&cUse &e/invkeep give <v/p> <player>
[amount
]'
set-usage: '&cUse &e/invkeep set <player> <amount>'
take-usage: '&cUse &e/invkeep take <player> <amount>'
get-usage: '&cUse &e/invkeep get <v/p>
[amount
]'
(Or directly backup the old config.yml, and get the new one.)
Fixes:
Fix give command not work.
New Features:
Now supports PlaceholderAPI.
Add new commands and permissions.
Now supports virtual / physical item.
When players die, they will first deduct the physical items.