本文整理汇总了Java中ch.njol.skript.lang.SkriptParser.ParseResult类的典型用法代码示例。如果您正苦于以下问题:Java ParseResult类的具体用法?Java ParseResult怎么用?Java ParseResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParseResult类属于ch.njol.skript.lang.SkriptParser包,在下文中一共展示了ParseResult类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] e, int matchedPattern, Kleenean isDelayed, ParseResult parser) {
if (matchedPattern == 0) {
title = (Expression<String>) e[0];
subtitle = (Expression<String>) e[1];
players = (Expression<Player>) e[2];
} else {
players = (Expression<Player>) e[0];
title = (Expression<String>) e[1];
subtitle = (Expression<String>) e[2];
}
time = (Expression<Timespan>) e[3];
fadeIn = (Expression<Timespan>) e[4];
fadeOut = (Expression<Timespan>) e[5];
return true;
}
示例2: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings({"unchecked", "null"})
@Override
public boolean init(final Expression<?>[] exprs, final int matchedPattern, final Kleenean isDelayed, final ParseResult parseResult) {
first = (Expression<? extends Number>) exprs[0];
second = (Expression<? extends Number>) exprs[1];
op = patterns.getInfo(matchedPattern);
if (op == Operator.DIV || op == Operator.EXP) {
returnType = Double.class;
} else {
final Class<?> f = first.getReturnType(), s = second.getReturnType();
final Class<?>[] integers = {Long.class, Integer.class, Short.class, Byte.class};
boolean firstIsInt = false, secondIsInt = false;
for (final Class<?> i : integers) {
firstIsInt |= i.isAssignableFrom(f);
secondIsInt |= i.isAssignableFrom(s);
}
if (firstIsInt && secondIsInt)
returnType = Long.class;
else
returnType = Double.class;
}
integer = returnType == Long.class;
return true;
}
示例3: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] arg0, int arg1, Kleenean arg2, ParseResult arg3) {
code = (Expression<String>) arg0[0];
name = (Expression<String>) arg0[1];
return true;
}
示例4: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@Override
public boolean init(Expression<?>[] arg0, int arg1, Kleenean arg2, ParseResult arg3) {
if (!ScriptLoader.isCurrentEvent(InventoryClickEvent.class)) {
Skript.error("[SkLib] Hey idiot! You cannot use the clicked row expression in this event.");
return false;
}
return true;
}
示例5: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] exp, int arg1, Kleenean arg2, ParseResult arg3) {
title = (Expression<String>) exp[0];
body = (Expression<String>) exp[1];
return true;
}
示例6: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] arg0, int arg1, Kleenean arg2, ParseResult arg3) {
url = (Expression<String>) arg0[0];
player = (Expression<Player>) arg0[1];
return true;
}
示例7: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] arg0, int arg1, Kleenean arg2, ParseResult arg3) {
player = (Expression<Player>) arg0[0];
message = (Expression<String>) arg0[1];
return true;
}
示例8: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] arg0, int arg1, Kleenean arg2, ParseResult arg3) {
title = (Expression<String>) arg0[0];
player = (Expression<Player>) arg0[1];
return true;
}
示例9: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] arg0, int arg1, Kleenean arg2, ParseResult arg3) {
slot = (Expression<Integer>) arg0[0];
player = (Expression<Player>) arg0[1];
value = (Expression<String>) arg0[2];
return true;
}
示例10: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings({"unchecked", "null"})
@Override
public boolean init(final Expression<?>[] exprs, final int matchedPattern, final Kleenean isDelayed, final ParseResult parseResult) {
regions = (Expression<Region>) exprs[0];
owners = parseResult.mark == 1;
return true;
}
示例11: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@Override
public boolean init(Expression<?>[] expr, int matchedPattern, Kleenean arg2, ParseResult arg3) {
if (!ScriptLoader.isCurrentEvent(SkriptCustomEvent.class)) {
Skript.error("Cannot use 'custom event's id' outside of custom events");
return false;
}
single = arg3.mark == 0;
return true;
}
示例12: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] e, int arg1, Kleenean arg2, ParseResult arg3) {
player = (Expression<Player>) e[0];
ability = (Expression<String>) e[1];
time = (Expression<Integer>) e[2];
return true;
}
示例13: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] e, int arg1, Kleenean arg2, ParseResult arg3) {
code = (Expression<String>) e[0];
server = (Expression<String>) e[1];
return true;
}
示例14: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] e, int i, Kleenean k, ParseResult p) {
line = (Expression<Number>) e[i];
path = (Expression<String>) e[1 - i];
return true;
}
示例15: init
import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(final Expression<?>[] vars, final int matchedPattern, final Kleenean isDelayed, final ParseResult parser) {
if (!ScriptLoader.isCurrentEvent(EntityDamageByEntityEvent.class, EntityDeathEvent.class, VehicleDamageEvent.class, VehicleDestroyEvent.class)) {
Skript.error("Cannot use 'attacker' outside of a damage/death/destroy event", ErrorQuality.SEMANTIC_ERROR);
return false;
}
return true;
}