本文整理汇总了Java中ch.njol.skript.lang.SkriptParser.ParseResult方法的典型用法代码示例。如果您正苦于以下问题:Java SkriptParser.ParseResult方法的具体用法?Java SkriptParser.ParseResult怎么用?Java SkriptParser.ParseResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ch.njol.skript.lang.SkriptParser
的用法示例。
在下文中一共展示了SkriptParser.ParseResult方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Literal<?>[] args, int matchedPattern,
SkriptParser.ParseResult parseResult) {
isChanger = (parseResult.mark & 1) == 1;
String what = parseResult.regexes.get(0).group();
switch (matchedPattern) {
case 0:
whiches.add(createSyntaxInfo(what, (parseResult.mark & 2) == 2, false));
break;
case 1:
String fromType = ((Literal<ClassInfo>) args[0]).getSingle().getCodeName();
whiches.add(createSyntaxInfo("[the] " + what + " of %$" + fromType + "s%", false, true));
whiches.add(createSyntaxInfo("%$" + fromType + "s%'[s] " + what, false, false));
break;
}
return true;
}
示例2: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelayed,
SkriptParser.ParseResult parseResult) {
object = Util.defendExpression(exprs[0]);
return Util.canInitSafely(object);
}
示例3: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@Override
public boolean init(Expression<?>[] expressions, int i, Kleenean kleenean, SkriptParser.ParseResult parseResult) {
a = (Expression<Number>) expressions[0];
b = (Expression<Number>) expressions[1];
return true;
}
示例4: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@Override
public boolean init(Expression<?>[] expr, int i, Kleenean kleenean, @NotNull SkriptParser.ParseResult parseResult) {
entity = (Expression<LivingEntity>) expr[0];
type = (Expression<PotionEffectType>) expr[1];
setNegated(parseResult.mark == 1);
return true;
}
示例5: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@Override
public boolean init(Expression<?>[] expressions, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parseResult) {
broadcast = matchedPattern == 0 || matchedPattern == 1;
messages = (Expression<String>) expressions[0];
if (!broadcast) {
players = expressions[1];
}
return true;
}
示例6: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelayed,
SkriptParser.ParseResult parseResult) {
objects = Util.defendExpression(exprs[0]);
return Util.canInitSafely(objects);
}
示例7: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
public boolean init(Expression<?>[] arg0, int arg1, Kleenean arg2, SkriptParser.ParseResult arg3) {
if (!ScriptLoader.isCurrentEvent(RedisReceiveEvent.class)) {
Skript.error((String)"Expression 'redis channel' can only be used inside a 'redis msg' event!");
return false;
}
return true;
}
示例8: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@Override
public boolean init(Expression<?>[] expr, int i, Kleenean kleenean, SkriptParser.ParseResult parseResult) {
type = (Expression<PotionEffectType>) expr[0];
duration = (Expression<Timespan>) expr[1];
level = (Expression<Number>) expr[2];
particles = (Expression<Boolean>) expr[3];
ambient = (Expression<Boolean>) expr[4];
color = (Expression<Color>) expr[5];
return true;
}
示例9: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] expr, int matchedPattern, Kleenean paramKleenean,
SkriptParser.ParseResult paramParseResult) {
player = (Expression<Player>) expr[0];
return true;
}
示例10: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@Override
public boolean init(Expression<?>[] expressions, int i, Kleenean kleenean, SkriptParser.ParseResult parseResult) {
if (!ScriptLoader.isCurrentEvent(PlayerRespawnEvent.class)) {
Skript.error("The 'respawn location' expression can only be used in the 'on respawn' event");
return false;
}
return true;
}
示例11: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] expr, int matchedPattern, Kleenean paramKleenean,
SkriptParser.ParseResult paramParseResult) {
player = (Expression<Player>) expr[0];
j = (Expression<Job>) expr[1];
return true;
}
示例12: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@Override
public boolean init(Expression<?>[] expressions, int i, Kleenean kleenean, SkriptParser.ParseResult parseResult) {
column = (Expression<Number>) expressions[0];
row = (Expression<Number>) expressions[1];
playerExpression = (Expression<Player>) expressions[2];
return true;
}
示例13: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@Override
public boolean init(Expression<?>[] expressions, int i, Kleenean kleenean, SkriptParser.ParseResult parseResult) {
info = infos.get(getClass());
if (!MundoUtil.posCurrentEvent(info.eventClass)) {
Skript.error(info.invalidEventError);
return false;
}
return true;
}
示例14: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] expr, int matchedPattern, Kleenean paramKleenean,
SkriptParser.ParseResult paramParseResult) {
s = (Expression<String>) expr[0];
return true;
}
示例15: init
import ch.njol.skript.lang.SkriptParser; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] e, int i, Kleenean k, SkriptParser.ParseResult p) {
file = (Expression<String>) e[0];
zip = (Expression<String>) e[1];
return true;
}