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


Java Skript.isAcceptRegistrations方法代码示例

本文整理汇总了Java中ch.njol.skript.Skript.isAcceptRegistrations方法的典型用法代码示例。如果您正苦于以下问题:Java Skript.isAcceptRegistrations方法的具体用法?Java Skript.isAcceptRegistrations怎么用?Java Skript.isAcceptRegistrations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ch.njol.skript.Skript的用法示例。


在下文中一共展示了Skript.isAcceptRegistrations方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onEnable

import ch.njol.skript.Skript; //导入方法依赖的package包/类
@Override
public void onEnable() {
	Util.sendCMsg("Loading Configuration...");
	loadConfiguration();
	Util.sendCMsg("Loaded Configuration...");
	Util.sendCMsg("Registering Events...");
	Bukkit.getPluginManager().registerEvents(this, this);
	Util.sendCMsg("Registered Events!");
	Util.sendCMsg("Loading Metrics...");
	Metrics metrics = new Metrics(this);
	String chatfilter = String.valueOf(getConfig().getBoolean("toggles.chatfilter"));
	metrics.addCustomChart(new Metrics.SimplePie("using_chat_filter") {
           @Override
           public String getValue() {
               return chatfilter;
           }
       });
	metrics.addCustomChart(new Metrics.SimplePie("kick_method") {
           @Override
           public String getValue() {
           	String kickmethod;
           	if (getConfig().getBoolean("toggles.useuuid") == true) {
       			kickmethod = "UUID";
       		} else {
       			kickmethod = "Username";
       		}
			return kickmethod;
           }
       });
	Util.sendCMsg("Loaded Metrics!");
	if (getServer().getPluginManager().getPlugin("Skript")!=null) {
		Util.sendCMsg("Skript has been found!");
		Util.sendCMsg("Registing Addon...");
		Skript.registerAddon(this);
		Util.sendCMsg("Registered Addon!");
		if (Skript.isAcceptRegistrations()) {
			Util.sendCMsg("Looks like Skript is looking for syntax so lets throw some shit at it...");
			Util.sendCMsg("Going to start to load the syntax...");
			Skript.registerCondition(CondRookFalse.class, "rook[ ][(craft|tube)] is a[n] (eclipse|java) (coder|developer)");
			Skript.registerCondition(CondRookTrue.class, "rook[ ][(craft|tube)] is not a[n] (eclipse|java) (coder|developer)");
			Skript.registerCondition(CondRookTrue.class, "rook[ ][(craft|tube)] (says|talks) [about] his server [is] not [being] a mineplex (copy|replica|clone|mirror)");
			Skript.registerCondition(CondRookTrue.class, "rook[ ][(craft|tube)] is a[n] anti md[(_5|-5|5)]");
			Skript.registerCondition(CondRookFalse.class, "rook[ ][(craft|tube)] is not a[n] anti md[(_5|-5|5)]");
			Skript.registerCondition(CondRookFalse.class, "rook[ ][(craft|tube)] is a[n] successful (person|server)");
			Skript.registerCondition(CondRookTrue.class, "rook[ ][(craft|tube)] is not a[n] successful (person|server)");
			Skript.registerCondition(CondRookTrue.class, "rook[ ][(craft|tube)] does bot download[s]");
			Skript.registerCondition(CondRookFalse.class, "rook[ ][(craft|tube)] does[n't] [not] bot download[s]");
			Skript.registerExpression(ExprRookSpigot.class, String.class, ExpressionType.PROPERTY, "rook[ ][(craft|tube)]['][s] spigot[ ][mc] [user]name");
			Util.sendCMsg("Loaded all of the Skript syntax!");
		} else {
			Util.sendCMsg("Skript is not looking to accept syntax/registrations. Did you restart the server?");
		}
	} else {
		Util.sendCMsg("Skript has not been found, so expect nothing to register.");
	}
	Util.sendCMsg("Anti-Rooktube(" + this.getDescription().getVersion() + ") by WheezyGold7931 has been loaded. Expect less Rook now!");
}
 
开发者ID:WheezyGold7931,项目名称:Anti-Rooktube,代码行数:58,代码来源:Main.java

示例2: get

import ch.njol.skript.Skript; //导入方法依赖的package包/类
@Override
protected Boolean[] get(Event event) {
    return new Boolean[] {Skript.isAcceptRegistrations()};
}
 
开发者ID:WheezyGold7931,项目名称:skript-hack,代码行数:5,代码来源:ExprAccepting.java

示例3: check

import ch.njol.skript.Skript; //导入方法依赖的package包/类
@Override
public boolean check(Event event) {
    return Skript.isAcceptRegistrations();
}
 
开发者ID:WheezyGold7931,项目名称:skript-hack,代码行数:5,代码来源:CondAccepting.java

示例4: checkAllowClassInfoInteraction

import ch.njol.skript.Skript; //导入方法依赖的package包/类
private final static void checkAllowClassInfoInteraction() {
	if (Skript.isAcceptRegistrations())
		throw new IllegalStateException("Cannot use classinfos until registration is over");
}
 
开发者ID:nfell2009,项目名称:Skript,代码行数:5,代码来源:Classes.java


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