这是本文档旧的修订版!
条件
例子
ShopName: 饥饿值条件 DisplayName: '饥饿值条件' signs: text: '[条件]' NeedPermissionToCreateSign: true InventorySize: 45 #商店大小:45格 shop: 5-1: #商店名:5-1 Condition: #调用条件 - type:Hunger #调用饱食度 - under:20 #要求低于20 RewardType: item PriceType: free Reward: - type:COOKED_CHICKEN - amount:1 MenuItem: - type:COOKED_CHICKEN - name:&9你饿吗? - 'lore:#&a你看起来很饿! #&a点击获得免费的寄肉!' - amount:1 #给予数量:1 InventoryLocation: 23 #位于格数:23 5: #商店名:5 RewardType: nothing PriceType: free MenuItem: - type:BARRIER - name:&9你饿吗? - 'lore:#&c你看起来不饿..#&c你饿了再来吧' - amount:1 InventoryLocation: 23
只有当玩家的饥饿值低于 20 时才会显示鸡肉商店物品,这意味着它会在玩家有任何饥饿值时显示(饥饿值 20 = 饥饿值条满)。否则将显示屏障。
结构
条件在列表中设置。首先,您需要定义当前的条件类型,然后设置条件规则。您可以添加任意数量的条件。例子:
Condition: - type:serverpinging #服务器ping - online:true #必须在线 - over:200 #超过200
Condition: - type:permission #权限 - match:permission.node #权限节点
Condition: - type:money #钱 - over:1000 #超过2000 - type:health #血量 - between:5:15 #介于5-15
规则
AND
需要满足列表中的所有条件才能显示项目。如果所有条件之一为假,则该项目将被隐藏。例子:
Condition: - type:money #钱 - over:1000 #超过2000 - type:health #血量 - between:5:15 #介于5-15
在这里,玩家需要 5-15 的生命值和超过 1000 的钱才能显示该物品。
OR
在“匹配”条件类型的情况下,可以使用可选条件:您可以列出不同的匹配值,用逗号分隔。如果其中一个值匹配,则条件返回 true,即使所有其他匹配值为 false。
Condition: - type:group - match:group1,group2,group3,group4
可用的条件类型
如果您希望添加一些其他类型的条件,请告诉我。
BossShopPro按照配置中设置的顺序加载所有商店物品。如果商品的条件不满足,该商品将不会显示。在这种情况下,如果其他商店物品定义了相同的库存位置,则会改为显示。
# 可能的条件类型和示例。 所有条件类型: - Money/Points - over:1000 (匹配任何 超过 1000 的余额 - vault 或 points插件) - under:500 (匹配任何 低于 500 的余额 - 保险库或积分插件) - equals:150 (Matches only a balance of 150 - vault or points plugin) - between:300:600 (Matches any balance between 300 and 600 - vault or points plugin) - ServerPinging - online:true (Matches if the server is succesfully pinged and online) - over:70 (Matches any player count over 70) - under:40 (Matches any player count under 40) - equals:500 (Matches only a player count of 500) - between:1:100 (Matches any player count between 1 and 100) - Permission - match:node.node (If this permission node is matched, it will be shown) - dontmatch:node.node (If this permission node is NOT matched, it will be shown) - Group - match:plus (Shows item if user is in group Plus) - dontmatch:vip (Shows item if user is NOT on group vip) - Item - match:stone (Shows item if user has stone in his inventory) - dontmatch:diamond (Shows item if user does not have diamonds in his inventory) - HandItem - match:stone (Shows item if user has stone in his main hand) - dontmatch:diamond (Shows item if user does not have diamonds in his main hand) - Health/Hunger/Exp - over:10 (Matches any health/hunger/exp level over 10) - under:5 (Matches any health/hunger/exp level below 5) - equals:15 (Matches exactly health/hunger/exp level of 15) - between:5:15 (Matches health/hunger/exp level between 5 and 15) - Time - over:4000 (Matches if the Minecraft day has passed 4000 ticks, from 0) - under:2000 (Matches if the Minecraft day has not passed 2000 ticks, from 0) - equals:8000 (Matches exactly 8000 Minecraft day ticks.. Not really useful) - between:12000:24000 (Matches if the Minecraft day is between 12000 and 24000 ticks) #RealDay = Day of year; RealWeekDay = Day of week, starting with monday = 1 - RealYear/RealMonth/RealWeek/RealDay/RealWeekDay/RealHour/RealSecond/RealMillisecond - over:12 (Matches if value is higher than 12) - under:20 (Matches if value is lower than 20) - equals:11 (Matches if value is 11; Can be used for a christmas calendar for example or weekly rewards) - between:18:24 (Matches if value is between 18 and 24) - LightLevel - over:10 (Matches if light level is high) - under:6 (Matches if light level is low) - equals:15 (Matches if lightlevel is at maximum brightness) - between:8:14 (Matches if the light level is not sunlight but still high) - LocationX/LocationY/LocationZ (The Y coordinate determines the height of the player) - over:100 (Matches if coordinate of player is higher than 100) - under:50 (Matches if coordinate is lower than 50) - equals:1 (Matches if coordinate equals 1) - between:1:40 (Matches if coordinate is between 1 and 40) - World - match:worldname (Shows item if user is in world with name "worldname") - dontmatch:worldname (Shows item if user is in world with a name different from "worldname") - Weather - match:storm (Matches if the weather is stormy. Opposite: match:clear) - dontmatch:storm (Matches if the weather is not stormy (=clear))