插件手册:betonquest:条件列表

差别

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

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
插件手册:betonquest:条件列表 [2017/02/10 20:26]
Afry_ [Height: height]
插件手册:betonquest:条件列表 [2021/09/24 13:54] (当前版本)
duangfafa [匹配日期: partialdate]
行 1: 行 1:
 ====== 条件列表 ====== ====== 条件列表 ======
  
-(翻译版本:2016.10.17)+(版本: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 =====
  
行 101: 行 139:
 **例子**: ''%%rating 10%%'' **例子**: ''%%rating 10%%''
  
-===== 随机: random persistent, static =====+===== 随机/概率: random =====
  
-随机条件.+**//persistent, static//**
  
-**例子**: ''%%random 12-100%%'' (平均100次中有12次满足条件)+以一定概率返回true。可以用来roll dice或抽奖。 
 + 
 +**例子**: ''%%random 12-100%%'' (平均100次中有12次满足条件,12%概率返回//true//)
  
 ===== 弯腰: sneak ===== ===== 弯腰: sneak =====
行 113: 行 153:
 **例子**: ''%%sneak%%'' **例子**: ''%%sneak%%''
  
-===== 任务状态: 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|可用列表]].
行 131: 行 173:
 **例子**: ''%%empty 5%%'' **例子**: ''%%empty 5%%''
  
-<del>## 工会: ''%%party%%''</del>+===== 团队: party ===== 
 + 
 +请参阅[[插件手册:betonquest:基本概念#团队_party|基本概念:团队Party]]了解更多关于“团队”的概念。 
 + 
 +这个判断还有三个可选参数,分别是''%%every:%%''''%%any:%%''和''%%count:%%''。团队内所有成员都需要满足''%%every:%%''内的全部条件;''%%any:%%''中的条件只需要被团队内的任意一个成员满足即可(如成员A满足第一个条件,成员B满足剩下的条件);''%%count:%%''用于判断团队内成员个数。 
 + 
 +你不需要同时使用三个参数,你可以只用其中一个(比如就一个''%%count:%%'')。
  
-<del>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.</del>+**例子**: ''%%party 10 has_tag1,!has_tag2 every:some_item any:some_location,some_other_item count:5%%''
  
-<del>**例子**''%%party 10 has_tag1,!has_tag2 every:some_item any:some_location,some_other_item count:5%%''</del>+===== 指定区域内有怪物monsters =====
  
-===== 区域有怪物: monsters persistent, static =====+**//persistent, static//**
  
 指定的范围有(或超过)一定数量数量的怪物. 有两个参数 - 怪物、位置. 怪物列表用逗号隔开. 每个怪物 ([[https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html|怪物列表]]) 都可以指定数量, 例如 ''%%ZOMBIE:5,SKELETON:2%%'' 有5个(或以上)的僵尸和2个(或以上)的骷髅. 位置条件 ''%%100;200;300;world;10%%'', 最后一个参数代表了搜索半径. 可以使用附加参数 ''%%name:%%'', 限制怪物的名字. 这里的空格要替换成''%%_%%''. 指定的范围有(或超过)一定数量数量的怪物. 有两个参数 - 怪物、位置. 怪物列表用逗号隔开. 每个怪物 ([[https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html|怪物列表]]) 都可以指定数量, 例如 ''%%ZOMBIE:5,SKELETON:2%%'' 有5个(或以上)的僵尸和2个(或以上)的骷髅. 位置条件 ''%%100;200;300;world;10%%'', 最后一个参数代表了搜索半径. 可以使用附加参数 ''%%name:%%'', 限制怪物的名字. 这里的空格要替换成''%%_%%''.
行 143: 行 191:
 **例子**: ''%%monsters ZOMBIE:2 100;200;300;world;10 name:Deamon%%'' **例子**: ''%%monsters ZOMBIE:2 100;200;300;world;10 name:Deamon%%''
  
-===== 任务: objective =====+===== 任务目标: objective =====
  
-判断玩家在执行任务 参照: //objectives.yml//.+判断玩家被分配的任务,如果某项任务正在进行中,则返回//true//数具体来自://objectives.yml//
  
 **例子**: ''%%objective wood%%'' **例子**: ''%%objective wood%%''
行 155: 行 203:
 **例子**: ''%%check ^tag beton ^item emerald:5 ^location 100;200;300;survival_nether;5 ^experience 20%%'' **例子**: ''%%check ^tag beton ^item emerald:5 ^location 100;200;300;survival_nether;5 ^experience 20%%''
  
-===== 箱子里的物品: chestitem persistent, static =====+===== 箱子里的物品: chestitem 
 + 
 +**//persistent, static//**
  
 和 ''%%item%%'' 条件相似, 但是判断的是箱子里的物品. 第一个参数是箱子的位置 ''%%100;200;300;world%%'' (必须是整数!) 第二个参数和''%%item%%''相同. 如果没有箱子,返回“否”. 和 ''%%item%%'' 条件相似, 但是判断的是箱子里的物品. 第一个参数是箱子的位置 ''%%100;200;300;world%%'' (必须是整数!) 第二个参数和''%%item%%''相同. 如果没有箱子,返回“否”.
行 161: 行 211:
 **例子**: ''%%chestitem 100;200;300;world emerald:5,sword%%'' **例子**: ''%%chestitem 100;200;300;world emerald:5,sword%%''
  
-<del>===== Scoreboard: ''%%score%%''=====</del>+===== 记分板Scoreboard分数: score ===== 
 + 
 +你可以用这个来判断玩家的//记分板Scoreboard//的某一项分数是否达到或超过某个值。第一个参数是''记分项目名称'',第二个参数则是数值(整数)。 
 + 
 +**例子**: ''%%score kills 20%%'' 
 + 
 +===== 所在世界: world ===== 
 + 
 +//condition//用来判断玩家是否在某个指定的世界。第一个参数是世界的名字。 
 + 
 +**例子**: ''world world_the_end'' 
 + 
 +===== 玩家游戏模式: gamemode ===== 
 + 
 +此//condition//用来判断玩家的//游戏模式//。参数是//游戏模式名称//,比如''survival''、''creaitve''、''adventure''。 
 + 
 +**例子**: ''gamemode survival'' 
 + 
 +===== 成就: achievement ===== 
 + 
 +此//condition//用来判断玩家是否已经达成了某个//成就//(默认为Minecraft自带的成就)。参数是//成就//的名字,具体名字请参阅[[https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Achievement.html|成就列表]]。 
 + 
 +**例子**: ''achievement BUILD_FURNACE'' 
 + 
 +===== 变量: variable ===== 
 + 
 +利用[[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 =====
  
-<del>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).</del>+判断该玩家是否可以和某个NPC开始对话。如果某个npc的对话开始条件//Conditions//都是false(没有满足条件的初始对话),那么这个判断返回false。
  
-<del>**例子**: ''%%score kills 20%%''</del>+**例子**: ''conversation innkeeper''
  • 插件手册/betonquest/条件列表.1486729560.txt.gz
  • 最后更改: 2017/02/10 20:26
  • Afry_