InventoryKeeper 物品栏保护 [1.7.10-1.17] | |
---|---|
![]() |
提供了恢复玩家库存和死亡经验的特定物品。完全可定制。 |
作 者 | starchier |
发布时间 | 2020年7月22日 |
支持核心 | Spigot | 原生版本 |
支持版本 | 1.7,1.8,1.9,1.10,1.11,1.12,1.13,1.14,1.15,1.16,1.17 |
插件详细介绍
InventoryKeeper 是一款 Minecraft 插件,旨在提供一种介于完全掉落和完全保留物品之间的平衡体验。它允许玩家使用特定的物品(虚拟或物理)或权限来恢复死亡时的背包和经验值,只有当游戏规则 `keepInventory` 设置为 `false` 时才生效。
/invkeep
- 主命令/invkeep get <v/p> <item-name> [amount]
- 获取指定物品
v
- 虚拟物品p
- 物理物品/invkeep give <v/p> <item-name> <player> [amount]
- 给予指定玩家物品/invkeep take <player> <item-name> [amount]
- 从玩家处拿走虚拟物品/invkeep set <player> <item-name> [amount]
- 设置玩家的虚拟物品数量/invkeep check [player]
- 检查虚拟物品数量/invkeep reload
- 重载配置权限:inventorykeeper.admin
默认 OP 用户拥有这些命令的访问权限。
/invkeep check [player]
- 允许玩家检查虚拟物品数量权限:
inventorykeeper.check
- 允许使用 /invkeep check
(默认)inventorykeeper.check.others
- 允许检查其他玩家的物品数量inventorykeeper.unlimited.<Item Name>
- 玩家拥有此权限时,使用物品不会被消耗,即拥有无限数量。(默认 OP)注意:inventorykeeper.keep
权限已弃用,请使用新的权限。
# *************************
#
# InventoryKeeper Config
#
# *************************
# Admin permission: inventorykeeper.admin The plugin only works when the world gamerule keepInventory is false.
# Configuration guide:
#
# Unlimited item permission: inventorykeeper.unlimited.<item name>
settings:
# Show debug messages if true. Trun it on if the plugin does not work properly and report it to author.
debug: false
# Display the death cause of a player in console. (Debug option) Default: false
show-death-cause-on-death: false
# If you are running on a modded server with Galacticraft mod installed, turn it on to keep galacticraft inventory. Default: false
galacticraft-mod-support: true
# Clear items with curse of vanishing when player dies.
clear-vanishing-curse-items: true
# Drop items with curse of binding when player dies.
drop-binding-curse-items: false
# Customize the default food level on respawn if a player died without keeping the inventory.
# Available types:
# keep -> Keep the food level on respawn instead of reset to full.
# reset -> Reset the food level on respawn like vanilla.
# set -> Customize the food level on respawn. Format: set,amount or set,min,max if you need a random food level.
# example: set,10 -> set the food level to 10 on respawn. set,5,10 -> set the food level to 5 - 10 on respawn.
default-hunger-level: set,10
# Customize the default saturation level on respawn if a player died without keeping the inventory.
default-saturation-level: set,0,5
# Compatibility Mode - if the plugin does not work properly, try to enable it.
# Don't enable this if the plugin works properly
compatibility-mode:
# try to set it to true if the item is consumed but the inventory still drops.
inventory: false
# try to set it to true if the experience level can not be set properly on respawn.
exp: false
# Execute commands on death if a player dies without keeping the inventory
# Command usage:%player% for the player name,%random% for a random number if needed
# To use random number in a command, the format should be: minimum|maximum|commands
# To run a command as OP, add [OP] on the head of a command.
# PlaceholderAPI placeholders are available now. To use placeholders, add them directly.
# To disable it, leave it empty. eg: run-commands-on-death-if-drops: []
# Example:
# run-commands-on-death-if-drops:
# - '[OP]fly off'
# - '10|200|eco take %player% %random%'
# - 'tell %player% Current server tps: %server_tps%'
run-commands-on-death-if-drops:
- '[OP]fly off'
# When player died without keeping the inventory, one of command groups will be chose randomly and executed.Same usage as above
# Mulitple commands is supported, use ";" to separate multiple commands, don't ADD ANY SPCAES after ";"
# Examples: (To disable, leave it empty: run-random-commands-on-death-if-drops: [])
run-random-commands-on-death-if-drops:
- 10|50|eco take %player% %random%;tell %player% You lost %random% coins!
- 1|10|eco give %player% %random%;tell %player% You gained %random% coins!
# Execute commands on respawn if a player dies without keeping the inventory.
# Examples:
# run-commands-on-respawn-if-drops:
# - '15|90|effect %player% minecraft:nausea %random% 1'
run-commands-on-respawn-if-drops:
- 15|90|effect %player% minecraft:nausea %random% 1
# When player died without keeping the inventory, one of command groups will be chose randomly and executed on respawn. Same usage as above.
# Examples:
# run-random-commands-on-respawn-if-drops:
# - 15|90|effect %player% minecraft:weakness %random% 1
# - 15|30|effect %player% minecraft:strength %random% 1
# - 15|30|effect %player% minecraft:resistance %random% 1
run-random-commands-on-respawn-if-drops:
- 15|90|effect %player% minecraft:weakness %random% 1
- 15|30|effect %player% minecraft:strength %random% 1
- 15|30|effect %player% minecraft:resistance %random% 1
messages:
lost-exp: '&eBut.. You lost &6%amount% &elevels exp.. Now your exp level is &a%total%&e.'
reloaded-config: '&aConfig reloaded!'
received-item: '&aYou just received &dx%amount% &e%item% &a!'
received-virtual-item: '&aYou just received &dx%amount% &e%item% &a,now you have
&e%total% &aitems!'
set-virtual-item: '&aSuccessfully set the amount of virtual item %item% for player
&e%player%&a, now the amount is &ex%amount%&a.'
take-virtual-item: '&aSuccessfully took &e%amount%x&a virtual items %item% from
&e%player%&a, now has &ex%total%&a!'
give-virtual-item: '&aSuccessfully gave &ex%amount%&a vitrual item %item% &r&ato
player &6%player%&a, now the total amount is &b%total% &a!'
modified-amount: '&eYour virtual &b%item% &ehas been modified, now you have &6x%amount%.'
virtual-item-count: '&eCurrently the virtual items you have :'
virtual-item-count-others: '&eCurrently player &6%p &ahas :'
virtual-item-format: '&7-&e %item% &7: &6%amount%'
no-permission: '&cYou dont have permission to use this command!'
player-only: '&cOnly player can use this command!'
is-not-number: '&e%s &cis not a valid number!'
item-not-exist: '&cThe item &d%s &cdoes not exist!'
give-usage: '&cUse &e/invkeep give <v/p> <item-name> <player> [amount]'
set-usage: '&cUse &e/invkeep set <player> <item-name> <amount>'
take-usage: '&cUse &e/invkeep take <player> <item-name> <amount>'
get-usage: '&cUse &e/invkeep get <v/p> <item-name> [amount]'
player-not-found: '&cPlayer &e%s &c is offline or not found!'
gave-item: '&aYou gave player &e%player% &6%amount%x &a%item%!'
invalid-item: '&cInvalid item name. Check your input or use item group name instead.'
help-msg:
- '&7----------&aInvKeeper Help&7----------'
- '&b /invkeep get <v/p> <item-name> [amount] &7- &6Get the specific item'
- '&b /invkeep give <v/p> <item-name> <player> [amount] &7- &6Give the saving item
to a player'
- '&b /invkeep take <player> <item-name> <amount> &7- &6Take the virtual item from
a player'
- '&b /invkeep set <player> <item-name> <amount> &7- &6Set the amount of a virtual
item of a player'
- '&b /invkeep check [player] &7- &6Check the remaining quantity of virtual items'
- '&b /invkeep reload &7- &6Reload config'
- ' &eV -> Virtual item'
- ' &eP -> Physical item'
- '&7------------------------------------'
# ********************
#
# Item Configuration
#
# ********************
# This configuration file is to set the custom items use to keep players' inventory.
# You can set multiple items. A higher priority item will be consumed first in players' inventory on death to keep their inventory.
# Here is an example of the custom item:
items:
#Group name, used to save player data. Once you set this, don't change it again.
default:
# In 1.13-, number and Sub-id(item damage) is accepted.
# Accepted examples: 273, '397:3', 'SKULL_ITEM:3', PLAYER_HEAD, 'WOOL:4'
item-id: 'STICK'
#The display name that will show in plugin commands. (Not the real item name)
name: '&6&lDeath amulet'
# TO use custom head texture, add it. (Optional)
# custom-texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWRmZjhkYmJhYjE1YmZiYjExZTIzYjFmNTBiMzRlZjU0OGFkOTgzMmMwYmQ3ZjVhMTM3OTFhZGFkMDA1N2UxYiJ9fX0=
# If you wish to use custom model, add custom-model-data. (Optional)
# custom-model-data: 1
# The display name of the item, remove this if you want to use vanilla item. (Optional)
item-name: '&6&lDeath amulet'
# The lore of the item. Remove it if not needed. (Optional)
item-lore:
- '&7Keeping this in your inventory,'
- '&7This amulet will restore your'
- '&7inventory if you died.'
# Set the enchantments of the item, Remove it if not needed. Format: ENCHANTMENT_NAME-LEVEL (Optional)
item-enchantments:
- durability-10
# Will the experience points be retained when the player dies.
save-exp: false
# The amount of exp the player will lose when he dies. If save-exp set to true, this will not work.
# Fixed value: exp-lose-percentage: 50 -> lose 50% exp
# Random value (minimum-maximum): exp-lose-percentage: 10-30 -> lose 10%-30% exp
exp-lose-percentage: 10-30
# Customize the food level on respawn.
# Available types:
# keep -> Keep the food level on respawn instead of reset to full.
# reset -> Reset the food level on respawn like vanilla.
# set -> Customize the food level on respawn. Format: set,amount or set,min,max if you need a random food level.
# example: set,10 -> set the food level to 10 on respawn. set,5,10 -> set the food level to 5 - 10 on respawn.
hunger-level: reset
# Customize the saturation level on respawn.
saturation-level: set,3,7
# The item will not work on the following worlds. Leave it empty or remove it to disable the function. (Optional)
disabled-worlds: []
# Execute commands on player death if this item is comsumed. The same as the settings in config.yml. (Optional)
# Leave it empty (Do not remove it) to disable the function.
run-commands-on-death: []
# One of command groups will be chose randomly and executed on player death. The same as the settings in config.yml. (Optional)
run-random-commands-on-death: []
# Execute commands on player respawn if this item is comsumed. The format is the same as above. (Optional)
run-commands-on-respawn:
- 15|90|effect %player% minecraft:fire_resistance %random% 1
# One of command groups will be chose randomly and executed on player respawn. (Optional)
run-random-commands-on-respawn:
- 10|30|effect %player% minecraft:strength %random% 1
- 10|30|effect %player% minecraft:speed %random% 1
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: []
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: true
#To disable, leave the list empty. -> names-list: []
names-list: []
#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.
items-with-lore-to-be-removed-on-death:
- '&6Soul bind'
# The custom message sent when player dies.
death-message: '&aThe &eAncient amulet &ain your backpack &asaved your inventory!!'
#The highest one will be consumed first.
priority: 10
# Set the effective death type of the item.
#When the death type is set to true, this item will work 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
SUFFOCATION: true
添加 custom-texture
字段。
custom-texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWRmZjhkYmJhYjE1YmZiYjExZTIzYjFmNTBiMzRlZjU0OGFkOTgzMmMwYmQ3ZjVhMTM3OTFhZGFkMDA1N2UxYiJ9fX0=
添加 custom-model-data
字段。
custom-model-data: 1
run-commands-on-death: []
run-commands-on-respawn: []
当玩家死亡(重生)时,将执行 run-commands-on-death
(run-commands-on-respawn
) 中的命令。
示例:
run-commands-on-death:
- 'eco take %player% 100'
- '[OP]fly off'
- '100|200|eco take %player% %random%'
run-random-commands-on-death: []
run-random-commands-on-respawn: []
(支持多个命令,使用 ;
分隔,不要添加任何空格!!)
示例:
run-random-commands-on-death:
- 'tell %player% Oops! You died!;eco take %player% 100'
- '[OP]fly off'
- '100|200|eco take %player% %random%;tell %player% Oops! You have lost %random% coins!'
它将随机选择一组并执行该组中的命令。
%player%
- 玩家名称%random%
- 替换为随机数PlaceholderAPI 的占位符现在可以直接添加到死亡/重生命令中。
要以 OP 身份运行命令,请在命令头部添加 [OP]
。
要使用随机数,命令格式应为:最小值|最大值|命令 1;命令 2...
。
您可以设置 enabled-death-type
和 filter-entities-name
、filter-entities-list
来决定插件的工作方式。
%inventorykeeper_amount_<Item name>%
- 返回玩家的虚拟物品数量%inventorykeeper_amount_<Item name>,<player name>%
- 返回其他玩家的虚拟物品数量(仅适用于在线玩家)如有任何问题或建议,请在此处创建评论或在 GitHub 上创建 issue!
如果您认为这个插件好用,欢迎捐赠!