• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ParseResult类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中ch.njol.skript.lang.SkriptParser.ParseResult的典型用法代码示例。如果您正苦于以下问题:Java ParseResult类的具体用法?Java ParseResult怎么用?Java ParseResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ParseResult类属于ch.njol.skript.lang.SkriptParser包,在下文中一共展示了ParseResult类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: 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 parser) {
	items = exprs[0];
	if (!Slot.class.isAssignableFrom(items.getReturnType()) && !ChangerUtils.acceptsChange(items, ChangeMode.SET, ItemStack.class)) {
		Skript.error(items + " cannot be coloured as it cannot be changed at all.");
		return false;
	}
	if (matchedPattern == 0) {
		color = (Expression<Color>) exprs[1];
	} else {
		rgb = new Expression[] {(Expression<Number>) exprs[1], (Expression<Number>) exprs[2], (Expression<Number>) exprs[3]};
	}
	return true;
}
 
开发者ID:nfell2009,项目名称:Skript,代码行数:16,代码来源:EffColorArmor.java


示例17: init

import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@Override
public boolean init(Expression<?>[] expr, int matchedPattern, Kleenean arg2, ParseResult result) {
	if (!ScriptLoader.isCurrentEvent(RenameNationEvent.class)
			&& !ScriptLoader.isCurrentEvent(DeleteNationEvent.class)
			&& !ScriptLoader.isCurrentEvent(NewNationEvent.class)
			&& !ScriptLoader.isCurrentEvent(NationAddTownEvent.class)
			&& !ScriptLoader.isCurrentEvent(NationRemoveTownEvent.class)) {
		return false;
	}
	return true;
}
 
开发者ID:Sharpjaws,项目名称:SharpSK,代码行数:12,代码来源:ExprTownyEventNation.java


示例18: 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) {
	passengers = matchedPattern == 2 ? null : (Expression<Entity>) exprs[0];
	vehicles = matchedPattern == 1 ? null : exprs[exprs.length - 1];
	if (passengers != null && vehicles != null && !passengers.isSingle() && vehicles.isSingle() && Entity.class.isAssignableFrom(vehicles.getReturnType()))
		Skript.warning("An entity can only have one passenger");
	return true;
}
 
开发者ID:nfell2009,项目名称:Skript,代码行数:10,代码来源:EffVehicle.java


示例19: 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) {
	invis = (Expression<Inventory>) exprs[0];
	if (invis instanceof Variable && !invis.isSingle() && parseResult.mark != 1)
		Skript.warning("'items in {variable::*}' does not actually represent the items stored in the variable. Use either '{variable::*}' (e.g. 'loop {variable::*}') if the variable contains items, or 'items in inventories {variable::*}' if the variable contains inventories.");
	return true;
}
 
开发者ID:nfell2009,项目名称:Skript,代码行数:9,代码来源:ExprItemsIn.java


示例20: init

import ch.njol.skript.lang.SkriptParser.ParseResult; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean init(Expression<?>[] e, int i, Kleenean k, ParseResult p) {
  path = (Expression<String>) e[0];
  ty = p.mark;
  return true;
}
 
开发者ID:tim740,项目名称:skUtilities,代码行数:8,代码来源:ExprDirList.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LCEResourcesHandler类代码示例发布时间:2022-05-22
下一篇:
Java Http2Exception类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap