插件手册:betonquest:条件列表

差别

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

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
插件手册:betonquest:条件列表 [2018/06/15 04:17]
小小k酱 更新版本
插件手册:betonquest:条件列表 [2021/09/24 13:54] (当前版本)
duangfafa [匹配日期: partialdate]
行 1: 行 1:
 ====== 条件列表 ====== ====== 条件列表 ======
  
-(版本:2017.01.12 [[https://github.com/Co0sh/BetonQuest/wiki/Conditions-List/f0d1258128e90c5874cababad45af7d40768ca13|原文链接]])+(版本:2017.01.12 翻译:Afry、kjiang [[https://github.com/Co0sh/BetonQuest/wiki/Conditions-List/f0d1258128e90c5874cababad45af7d40768ca13|原文链接]])
  
 ---- ----
  
 +===== 成就: advancement =====
 +
 +这个条件检查玩家是否有指定的成就。唯一的参数是进度的全名。这包括在您的服务器上配置的成就名称。 [[https://minecraft.gamepedia.com/Advancement#List_of_advancements|所有原版成就的列表]]。
 +
 +**例子** ''advancement minecraft:adventure/kill_a_mob''
 ===== 背包里的物品: item ===== ===== 背包里的物品: item =====
  
行 21: 行 26:
 满足一项条件即可. ''%%!%%'' 代表''%%非%%''. 满足一项条件即可. ''%%!%%'' 代表''%%非%%''.
  
-**例子**: ''%%or night,rain,!has_armor%%'' (现在是夜晚,或者正在下雨,或者没有护甲)+**例子**: ''%%or condition-night,condition-rain,!condition-has_armor%%'' (现在是夜晚,或者正在下雨,或者没有护甲)
  
 ===== 与: and ===== ===== 与: and =====
行 27: 行 32:
 同时满足所有条件. 同时满足所有条件.
  
-**例子**: ''%%and has_helmet,has_chestplate,has_leggings,has_boots%%'' (同时有头盔、胸甲、护腿、靴子)+**例子**: ''%%and condition-has_helmet,condition-has_chestplate,condition-has_leggings,condition-has_boots%%'' (同时有头盔、胸甲、护腿、靴子)
  
 ===== 位置: location ===== ===== 位置: location =====
  
-判断玩家的位置是否在某个范围之内 ''%%x;y;z;world;distance%%''.+判断玩家的位置是否在某个范围之内 ''%%x;y;z;world distance%%''.
  
-**例子**: ''%%location 100;200;300;survival_nether;5%%'' (在survival_nether世界,距离100,200,300在5格之内)+**例子**: ''%%location 100;200;300;survival_nether 5%%'' (在survival_nether世界,距离100,200,300在5格之内)
  
 ===== 血量: health ===== ===== 血量: health =====
行 58: 行 63:
  
 **例子**: ''%%point beton 20%%'' **例子**: ''%%point beton 20%%''
 +
 +===== 全局积分: globalpoint =====
 +persistent, static
 +
 +与积分条件相同,但它检查全局积分类别的数量,该类别对所有玩家具有相同的值。
 +
 +**例子** ''globalpoint global_knownusers 100''
 +
 +===== 全局标签: globaltag =====
 +persistent, static
 +
 +这需要设置一个特定的全局标签,其工作方式与正常标签条件相同。
 +
 +**例子** ''globaltag global_areNPCsAgressive''
  
 ===== 标签: tag ===== ===== 标签: tag =====
行 83: 行 102:
 **例子**: ''%%time 2-23%%'' **例子**: ''%%time 2-23%%''
  
 +===== 星期几: dayofweek =====
 +
 +此条件返回 ''true'' 必须是一周中的特定日期。您可以指定当天的英文名称或当天的编号(1 是星期一,7 是星期日……)。
 +
 +**例子** ''dayofweek sunday''
 +
 +===== 匹配年/月/日: partialdate =====
 +
 +当前日期必须匹配给定的模式。您可以指定该返回 true 的条件:''day'' , ''month'' or ''year'' ,或者将它们组合起来。您还可以指定多个天/月/年,只需将它们分隔开'',''或使用''-''. 如果您无法理解这是如何工作的,请查看示例。
 +
 +这个例子在每个月的 1 号和 5 号或 20 号之间是正确的,但仅限于 2017 年。
 +
 +**例子** ''partialdate day:1-5,20 year:2017''
 +
 +===== 匹配时间: realtime =====
 +
 +这个条件必须有一个特定的(现实)时间才能返回真。您需要指定hh:mm以破折号分隔的两次)。如果第一个在第二个之前,则时间必须在这两者之间,如果在第二个之后,则时间必须晚于第一个且早于第二个才能返回 true。
 +
 +**例子** ''realtime 8:00-12:30''
 ===== 天气: weather ===== ===== 天气: weather =====
  
行 117: 行 155:
 ===== 日记: journal ===== ===== 日记: journal =====
  
-判断玩家的小本本(源于 ''%%journal.yml%%'' 文件).+判断玩家的小本本是否有某些记录(源于 ''%%journal.yml%%'' 文件).
  
 **例子**: ''%%journal wood_started%%'' **例子**: ''%%journal wood_started%%''
  
-===== 方块检测: testforblock persistent, static =====+===== 方块检测: testforblock ===== 
 + 
 +//persistent, static//
  
 判断某个位置是否是某个方块[[https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html|可用列表]]. 判断某个位置是否是某个方块[[https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html|可用列表]].
行 133: 行 173:
 **例子**: ''%%empty 5%%'' **例子**: ''%%empty 5%%''
  
-===== 团队: ''%%party%%'' =====+===== 团队: party ===== 
 + 
 +请参阅[[插件手册:betonquest:基本概念#团队_party|基本概念:团队Party]]了解更多关于“团队”的概念。 
 + 
 +这个判断还有三个可选参数,分别是''%%every:%%''、''%%any:%%''和''%%count:%%''。团队内所有成员都需要满足''%%every:%%''内的全部条件;''%%any:%%''中的条件只需要被团队内的任意一个成员满足即可(如成员A满足第一个条件,成员B满足剩下的条件);''%%count:%%''用于判断团队内成员个数。
  
-To see details about parties read “Party” chapter in **Reference** section. This condition takes three optional arguments: ''%%every:%%'', ''%%any:%%'' and ''%%count:%%''. “Every” is a list of conditions that must be met by every player in the party. Any is a list of conditions that must be met by at least one player in a party (it doesn’t have to be the same player, one can meet first condition, another one can meet the rest and it will work). Count is just a number, minimal amount of players in the party. You don’t have to specify all those arguments, you can use only one if you want.+你不需要同时使用三个参数,你可以只用其中一个(比如就一个''%%count:%%'')。
  
 **例子**: ''%%party 10 has_tag1,!has_tag2 every:some_item any:some_location,some_other_item count:5%%'' **例子**: ''%%party 10 has_tag1,!has_tag2 every:some_item any:some_location,some_other_item count:5%%''
行 149: 行 193:
 ===== 任务目标: objective ===== ===== 任务目标: objective =====
  
-判断玩家正在被分配的任务,如果某项任务正在进行中,则返回//true//。具体请参照://objectives.yml//+判断玩家正在被分配的任务,如果某项任务正在进行中,则返回//true//参数具体来自://objectives.yml//
  
 **例子**: ''%%objective wood%%'' **例子**: ''%%objective wood%%''
行 167: 行 211:
 **例子**: ''%%chestitem 100;200;300;world emerald:5,sword%%'' **例子**: ''%%chestitem 100;200;300;world emerald:5,sword%%''
  
-===== 记分板分数: score =====+===== 记分板Scoreboard分数: score =====
  
-With this condition you can check if the score in a specified objective on a scoreboard is greater or equal to specified amount. The first argument is the name of the objective, second one is amount (an integer).+你可以用这个来判断玩家的//记分板Scoreboard//的某一项分数是否达到或超过某个值。第一个参数是''记分项目名称'',第二个参数则是数值(整数)。
  
 **例子**: ''%%score kills 20%%'' **例子**: ''%%score kills 20%%''
行 175: 行 219:
 ===== 所在世界: world ===== ===== 所在世界: world =====
  
-This conditions checks if the player is in a specified world. The first argument is the name of a world.+此//condition//用来判断玩家是否在某个指定的世界。第一个参数是世界的名字。
  
-**Example**: `world world`+**例子**: ''world world_the_end''
  
 ===== 玩家游戏模式: gamemode ===== ===== 玩家游戏模式: gamemode =====
  
-This condition checks if the player is in a specified game mode. The first argument is the game mode, i.e. survival, creative, adventure.+此//condition//用来判断玩家的//游戏模式//。参数是//游戏模式名称//,比如''survival''、''creaitve''、''adventure''
  
-**Example**: `gamemode survival`+**例子**: ''gamemode survival''
  
 ===== 成就: achievement ===== ===== 成就: achievement =====
  
-This condition checks if the player has specified achievement (default Minecraft achievements). The first argument is name of the [achievement](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Achievement.html).+此//condition//用来判断玩家是否已经达成了某个//成就//(默认为Minecraft自带的成就)。参数是//成就//的名字,具体名字请参阅[[https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Achievement.html|成就列表]]。
  
-**Example**: `achievement BUILD_FURNACE`+**例子**: ''achievement BUILD_FURNACE''
  
 ===== 变量: variable ===== ===== 变量: variable =====
  
-This condition checks if a variable value matches given [pattern](https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html). The first argument is a variable (with `%` characters). Second one is the pattern (for example, if you want to check if it's "word", the patter would simply be `word`, but if you want to check if it's a number (positive or negative) you would use `-?\d+` pattern `-?` means a dash or no dash, `\d` means any digit and `+` allows that digit to be repeated one or more times).+利用[[https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html|正则表达式]],此//condition//用来判断某个//变量Variable//是否符合某些值。第一个参数是''%变量名称%'',需要用''%''套起来。第二个参数是''正则表达式''。举个例子,如果你想判断''%world%''是不是“world_the_end”,这个Pattern你只需要写''world_the_end''即可;如果你想判断某个变量是不是数字,你需要填''-?\d+'',这里前面的''-?''表示有或没有负号都行,''\d''表示一定要有数字,最后的''+''表示这个数字是不是一个或以上,连在一起就表示匹配所有正整数或负整数。 
 + 
 +**例子**: ''variable %objective.var.price% -?\d+'' 
 + 
 +===== 鞘翅飞行: fly ===== 
 + 
 +检查该玩家是否在使用鞘翅飞行。 
 + 
 +**例子**: ''fly'' 
 + 
 +===== 生物群系: biome ===== 
 + 
 +判断玩家在什么生物群系,具体名称请看[[https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Biome.html|生物群系列表]]。 
 + 
 +**例子**: ''biome savanna_rock'' 
 + 
 +===== 脸部朝向: facing ===== 
 + 
 +判断玩家朝向。具体的方向可以有''UP''、''DOWN''、''NORTH''、''EAST''、''WEST''、''SOUTH'',其中UP和DOWN从60°开始算起。 
 + 
 +**例子**: ''facing EAST'' 表示面朝东边 
 + 
 +===== 看着方块: looking ===== 
 + 
 +判断该玩家是否看到了某方块。你必须指定方块的位置''loc:'',或使用[[插件手册:betonquest:基本概念#方块选择_block_selectors|方块选择器 Block Selectors]]指定方块种类''type:'',两者可同时指定。 
 + 
 +**例子**: ''looking loc:12.0;14.0;-15.0;world type:STONE'' 
 + 
 +===== 月相: mooncycle ===== 
 + 
 +判断该玩家头顶上的月相是什么(1表示满月,8表示盈凸月),如果满足则返回true,具体月相列表请看[[https://minecraft-zh.gamepedia.com/%E6%9C%88%E4%BA%AE|这里]]。 
 + 
 +**例子**: ''mooncycle 1'' 
 + 
 +===== 可进行对话: conversation ===== 
 + 
 +判断该玩家是否可以和某个NPC开始对话。如果某个npc的对话开始条件//Conditions//都是false(没有满足条件的初始对话),那么这个判断返回false。
  
-**Example**: `variable %objective.var.price% -?\d+`+**例子**: ''conversation innkeeper''
  • 插件手册/betonquest/条件列表.1529007430.txt.gz
  • 最后更改: 2018/06/15 04:17
  • 小小k酱