插件手册:bossshop:conditions

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
插件手册:bossshop:conditions [2022/02/06 14:05] – [AND] duangfafa插件手册:bossshop:conditions [2022/02/07 16:44] (当前版本) – [例子] duangfafa
行 33: 行 33:
     - amount:             #给予数量:1     - amount:             #给予数量:1
     InventoryLocation: 23   #位于格数:23     InventoryLocation: 23   #位于格数:23
 +    ExtraPermission: '临时权限'
   5:                #商店名:5   5:                #商店名:5
     RewardType: nothing     RewardType: nothing
行 101: 行 102:
 # 可能的条件类型和示例。 # 可能的条件类型和示例。
 所有条件类型: 所有条件类型:
-    - Money/Points+    - Money/Points   
 +    # 金钱
         - over:1000             (匹配任何 超过 1000 的余额 - vault 或 points插件)         - over:1000             (匹配任何 超过 1000 的余额 - vault 或 points插件)
-        - under:500             (匹配任何 低于 500 的余额 - 保险库积分插件) +        - under:500             (匹配任何 低于 500 的余额 - vault 或 points插件) 
-        - equals:150            (Matches only a balance of 150 - vault or points plugin+        - equals:150            (仅 匹配 150 的余额 - vault 或 points插件
-        - between:300:600       (Matches any balance between 300 and 600 - vault or points plugin+        - between:300:600       (匹配 300 和 600 之间的余额 - vault 或 points插件) 
-    - ServerPinging + 
-        - online:true           (Matches if the server is succesfully pinged and online+    - ServerPinging   
-        - over:70               (Matches any player count over 70) +    # 延迟 
-        - under:40              (Matches any player count under 40) +        - online:true           (如果服务器成功 ping 并在线,则匹配
-        - equals:500            (Matches only a player count of 500) +        - over:70               (匹配任何 超过 70 的玩家
-        - between:1:100         (Matches any player count between and 100) +        - under:40              (匹配任何 低于 40 的玩家
-    - Permission +        - equals:500            (仅 匹配 500 的玩家
-        - match:node.node       (If this permission node is matched, it will be shown+        - between:1:100         (匹配 到 100 之间 的玩家) 
-        - dontmatch:node.node   (If this permission node is NOT matched, it will be shown+ 
-    - Group +    - Permission   
-        - match:plus            (Shows item if user is in group Plus+    # 权限 
-        - dontmatch:vip         (Shows item if user is NOT on group vip+        - match:node.node       (如果此 权限节点 匹配  ,则显示
-    - Item +        - dontmatch:node.node   (如果此 权限节点 不匹配,将显示) 
-        - match:stone           (Shows item if user has stone in his inventory+ 
-        - dontmatch:diamond     (Shows item if user does not have diamonds in his inventory+    - Group   
-    - HandItem +    # 权限组 
-        - match:stone           (Shows item if user has stone in his main hand+        - match:admin            (如果用户在 admin 组中,则显示项目
-        - dontmatch:diamond     (Shows item if user does not have diamonds in his main hand+        - dontmatch:admin         (如果用户不在组 admin 中,则显示项目) 
-    - Health/Hunger/Exp + 
-        - over:10               (Matches any health/hunger/exp level over 10) +    - Item   
-        - under:              (Matches any health/hunger/exp level below 5) +    # 物品 
-        - equals:15             (Matches exactly health/hunger/exp level of 15) +        - match:stone           (如果用户的物品栏中 有   石头,则显示物品
-        - between:5:15          (Matches health/hunger/exp level between and 15) +        - dontmatch:diamond     (如果用户的物品栏中 没有 钻石,则显示物品) 
-    - Time + 
-        - over:4000             (Matches if the Minecraft day has passed 4000 ticks, from 0) +    - HandItem    
-        - 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+        - match:stone           (如果用户的主手 有   石头,则显示项目
-        - between:12000:24000   (Matches if the Minecraft day is between 12000 and 24000 ticks+        - dontmatch:diamond     (如果用户的主手 没有 钻石,则显示项目) 
-#RealDay = Day of year; RealWeekDay = Day of weekstarting with monday = 1+ 
 +    - Health/Hunger/Exp   
 +    # 血量/饥饿/经验 
 +        - over:10               (匹配任何 健康/饥饿/exp等级 大于 10) 
 +        - under:              (匹配任何 健康/饥饿/exp等级 小于 5) 
 +        - equals:15             (匹配任何 健康/饥饿/exp等级 等于 15) 
 +        - between:5:15          (匹配任何 健康/饥饿/exp等级 在 5-15 之间) 
 + 
 +    - Time   
 +    # 时间 
 +        - over:4000             (如果 Minecraft 时间 超过 4000 个刻度,则匹配,从 开始
 +        - under:2000            (如果 Minecraft 时间 低于 2000 个刻度,则匹配,从 开始
 +        - equals:8000           (精确匹配 8000 个 Minecraft 日滴答声。。不是很有用
 +        - between:12000:24000   (如果 Minecraft 天数介于 12000 到 24000 个滴答声之间,则匹配) 
 + 
 +#RealDay = 一年中的一天; 
 +#RealWeekDay = 星期几星期一 = 1
     - RealYear/RealMonth/RealWeek/RealDay/RealWeekDay/RealHour/RealSecond/RealMillisecond     - 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) +        - over:12               (如果值 高于 12 则匹配
-        - equals:11             (Matches if value is 11; Can be used for a christmas calendar for example or weekly rewards+        - under:20              (如果值 低于 20 则匹配
-        - between:18:24         (Matches if value is between 18 and 24)+        - equals:11             (如果值 等于  11 则匹配;可用于例如圣诞节日历或每周奖励
 +        - between:18:24         (如果值在 18 和 24 之间则匹配) 
     - LightLevel     - LightLevel
-        - over:10               (Matches if light level is high+    # 光照亮度 
-        - under:              (Matches if light level is low+        - over:10               (如果值 高于 10 则匹配
-        - equals:15             (Matches if lightlevel is at maximum brightness+        - under:              (如果值 低于 6  则匹配
-        - between:8:14          (Matches if the light level is not sunlight but still high+        - equals:11             (如果值 等于 11 则匹配
-    - LocationX/LocationY/LocationZ (The coordinate determines the height of the player+        - between:8:14         (如果值在 8 和 14 之间则匹配) 
-        - over:100              (Matches if coordinate of player is higher than 100) + 
-        - under:50              (Matches if coordinate is lower than 50+    - LocationX/LocationY/LocationZ (Y 坐标决定玩家的高度) 
-        - equals:             (Matches if coordinate equals 1) +    # 匹配 X,Y,Z 
-        - between:1:40          (Matches if coordinate is between and 40)+        - over:100              (如果玩家的坐标 高于 100 则匹配
 +        - under:50              (如果玩家的坐标 低于 100 则匹配
 +        - equals:             (如果玩家的坐标 等于   则匹配
 +        - between:1:40          (如果坐标在 和 40 之间 则匹配) 
     - World     - 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")+        - match:worldname       (如果用户 在   世界“worldname”,则显示项目
 +        - dontmatch:worldname   (如果用户 不在 世界“worldname” ,则显示项目) 
     - Weather     - Weather
-        - match:storm           (Matches if the weather is stormy. Opposite: match:clear) +    #匹配天气 
-        - dontmatch:storm       (Matches if the weather is not stormy (=clear))+        - match:storm           (匹配天气是暴风雨。相反: match:clear) 
 +        - dontmatch:storm       (匹配如果天气不是暴风雨 (=clear))
 </code> </code>
 +==== 占位符条件 ====
 +条件类型“placeholdernumber”和“placeholdermatch”允许检查任何BossShopPro或PlaceholderAPI支持的占位符并检查任何支持的插件的值。
 +
 +__占位符编号:__
 +<code yaml [enable_line_numbers="true"]>
 +    Condition:
 +    - type:placeholdernumber
 +    - '%balancepoints%:over:100'
 +</code>
 +
 +__占位符匹配:__
 +<code yaml [enable_line_numbers="true"]>
 +    Condition:
 +    - type:placeholdermatch
 +    - '%item_in_hand%:match:WOOD_SWORD,STONE_SWORD,IRON_SWORD,GOLD_SWORD,DIAMOND_SWORD'
 +</code>
 +占位符中的冒号 (":") 不能直接工作,因为 BossShopPro 使用冒号来将行拆分为占位符、条件和条件类型。如果您的占位符包含冒号,请改用 '' "[colon]" '' 来使它们起作用。
 +
 +**模支持**
 +
 +数值条件类型支持模。这是一个高级示例:
 +<code yaml [enable_line_numbers="true"]>
 +  Moving_1:
 +    MenuItem:
 +    - name:&c[*]
 +    - type:STAINED_GLASS_PANE:0
 +    RewardType: NOTHING
 +    PriceType: NOTHING
 +    Message: ''
 +    ExtraPermission: ''
 +    InventoryLocation: 1
 +    Condition:
 +    - type:realsecond
 +    - 'between:0:5#%45'
 +  Moving_2:
 +    MenuItem:
 +    - name:&c[*]
 +    - type:STAINED_GLASS_PANE:1
 +    RewardType: NOTHING
 +    PriceType: NOTHING
 +    Message: ''
 +    ExtraPermission: ''
 +    InventoryLocation: 2
 +    Condition:
 +    - type:realsecond
 +    - 'between:6:10#%45'
 +  Moving_3:
 +    MenuItem:
 +    - name:&c[*]
 +    - type:STAINED_GLASS_PANE:2
 +    RewardType: NOTHING
 +    PriceType: NOTHING
 +    Message: ''
 +    ExtraPermission: ''
 +    InventoryLocation: 3
 +    Condition:
 +    - type:realsecond
 +    - 'between:11:15#%45'
 +  Moving_4:
 +    MenuItem:
 +    - name:&c[*]
 +    - type:STAINED_GLASS_PANE:3
 +    RewardType: NOTHING
 +    PriceType: NOTHING
 +    Message: ''
 +    ExtraPermission: ''
 +    InventoryLocation: 4
 +    Condition:
 +    - type:realsecond
 +    - 'between:16:20#%45'
 +  Moving_5:
 +    MenuItem:
 +    - name:&c[*]
 +    - type:STAINED_GLASS_PANE:4
 +    RewardType: NOTHING
 +    PriceType: NOTHING
 +    Message: ''
 +    ExtraPermission: ''
 +    InventoryLocation: 5
 +    Condition:
 +    - type:realsecond
 +    - 'between:21:25#%45'
 +  Moving_6:
 +    MenuItem:
 +    - name:&c[*]
 +    - type:STAINED_GLASS_PANE:5
 +    RewardType: NOTHING
 +    PriceType: NOTHING
 +    Message: ''
 +    ExtraPermission: ''
 +    InventoryLocation: 6
 +    Condition:
 +    - type:realsecond
 +    - 'between:26:30#%45'
 +  Moving_7:
 +    MenuItem:
 +    - name:&c[*]
 +    - type:STAINED_GLASS_PANE:6
 +    RewardType: NOTHING
 +    PriceType: NOTHING
 +    Message: ''
 +    ExtraPermission: ''
 +    InventoryLocation: 7
 +    Condition:
 +    - type:realsecond
 +    - 'between:31:35#%45'
 +  Moving_8:
 +    MenuItem:
 +    - name:&c[*]
 +    - type:STAINED_GLASS_PANE:7
 +    RewardType: NOTHING
 +    PriceType: NOTHING
 +    Message: ''
 +    ExtraPermission: ''
 +    InventoryLocation: 8
 +    Condition:
 +    - type:realsecond
 +    - 'between:36:40#%45'
 +  Moving_9:
 +    MenuItem:
 +    - name:&c[*]
 +    - type:STAINED_GLASS_PANE:8
 +    RewardType: NOTHING
 +    PriceType: NOTHING
 +    Message: ''
 +    ExtraPermission: ''
 +    InventoryLocation: 9
 +    Condition:
 +    - type:realsecond
 +    - 'between:41:45#%45'
 +</code>
 +这将生成一个动画项目,该项目将从插槽 1 移动到插槽 9,然后再次从插槽 1 开始。
 +
 +将 "#%<divisor>" 放在条件末尾会使 BossShopPro 通过模数转换与条件相关的值。
 +
 +例如,如果您使用条件类型“realsecond”并使用模“10”,则条件检查器收到的所有值都在 0 和 9 之间,因为“<当前时间 % 10>”将导致该范围内的数字。如果您想创建动画商店,Modulo 会很有帮助。
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
  
  
  • 插件手册/bossshop/conditions.1644127521.txt.gz
  • 最后更改: 2022/02/06 14:05
  • duangfafa