当前位置: 首页>>代码示例>>Java>>正文


Java ParseResult类代码示例

本文整理汇总了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;
}
 
开发者ID:TheLimeGlass,项目名称:Skellett,代码行数:18,代码来源:EffTitle.java

示例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;
}
 
开发者ID:nfell2009,项目名称:Skript,代码行数:25,代码来源:ExprArithmetic.java

示例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;
}
 
开发者ID:WheezyGold7931,项目名称:skLib,代码行数:8,代码来源:ExprCreateQrCode.java

示例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;
}
 
开发者ID:WheezyGold7931,项目名称:skLib,代码行数:9,代码来源:ExprClickedRow.java

示例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;
}
 
开发者ID:WheezyGold7931,项目名称:skLib,代码行数:8,代码来源:ExprNewPastePublic.java

示例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;
}
 
开发者ID:WheezyGold7931,项目名称:skLib,代码行数:8,代码来源:EffSendImageChat.java

示例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;
}
 
开发者ID:WheezyGold7931,项目名称:skLib,代码行数:8,代码来源:EffCreateBossBar.java

示例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;
}
 
开发者ID:WheezyGold7931,项目名称:skLib,代码行数:8,代码来源:EffCreateScrollSB.java

示例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;
}
 
开发者ID:WheezyGold7931,项目名称:skLib,代码行数:9,代码来源:EffSetScoreSB.java

示例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;
}
 
开发者ID:nfell2009,项目名称:Skript,代码行数:8,代码来源:ExprMembersOfRegion.java

示例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;
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:10,代码来源:ExprIDOfCustomEvent.java

示例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;
}
 
开发者ID:TheLimeGlass,项目名称:Skellett,代码行数:9,代码来源:EffOITBSetCooldown.java

示例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;
}
 
开发者ID:TheLimeGlass,项目名称:Skellett,代码行数:8,代码来源:EffBungeeEvaluate.java

示例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;
}
 
开发者ID:tim740,项目名称:skUtilities,代码行数:8,代码来源:SExprEditLine.java

示例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;
}
 
开发者ID:nfell2009,项目名称:Skript,代码行数:10,代码来源:ExprAttacker.java


注:本文中的ch.njol.skript.lang.SkriptParser.ParseResult类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。