本文整理汇总了Java中ch.njol.skript.lang.Condition类的典型用法代码示例。如果您正苦于以下问题:Java Condition类的具体用法?Java Condition怎么用?Java Condition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Condition类属于ch.njol.skript.lang包,在下文中一共展示了Condition类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setScope
import ch.njol.skript.lang.Condition; //导入依赖的package包/类
@Override
public void setScope() {
TriggerItem possibleCatch = scope.getNext();
if (possibleCatch instanceof Conditional) {
try {
Condition catchCond = (Condition) CustomScope.condition.get(possibleCatch);
if (catchCond instanceof ScopeCatch) {
this.scopeCatch = (ScopeCatch) catchCond;
} else {
Skript.warning("It is recommended to use a catch statement after a try statement");
}
} catch (IllegalAccessException e) {
Logging.reportException(this, e);
}
} else {
Skript.warning("It is recommended to use a catch statement after a try statement");
}
last.setNext(null);
}
开发者ID:MundoSK,项目名称:MundoSK,代码行数:20,代码来源:ScopeTry.java
示例2: registerCondition
import ch.njol.skript.lang.Condition; //导入依赖的package包/类
/**
* registers a {@link Condition}.
*
* @param condition The condition's class
* @param patterns Skript patterns to match this condition
*/
@SuppressWarnings("null")
public static <E extends Condition> void registerCondition(final Class<E> condition, final String... patterns) throws IllegalArgumentException {
checkAcceptRegistrations();
Pair<Boolean, String[]> pair = FeatureConfig.contains(condition.getSimpleName(), patterns);
if(pair.getFirst())
return;
final SyntaxElementInfo<E> info = new SyntaxElementInfo<E>(pair.getSecond(), condition);
conditions.add(info);
statements.add(info);
}
开发者ID:nfell2009,项目名称:Skript,代码行数:18,代码来源:SkriptCopy.java
示例3: registerCondition
import ch.njol.skript.lang.Condition; //导入依赖的package包/类
/**
* registers a {@link Condition}.
*
* @param condition The condition's class
* @param patterns Skript patterns to match this condition
*/
public static <E extends Condition> void registerCondition(final Class<E> condition, final String... patterns) throws IllegalArgumentException {
checkAcceptRegistrations();
final SyntaxElementInfo<E> info = new SyntaxElementInfo<E>(patterns, condition);
conditions.add(info);
statements.add(info);
}
开发者ID:nfell2009,项目名称:Skript,代码行数:13,代码来源:Skript.java
示例4: getConditions
import ch.njol.skript.lang.Condition; //导入依赖的package包/类
public static Collection<SyntaxElementInfo<? extends Condition>> getConditions() {
return conditions;
}
开发者ID:nfell2009,项目名称:Skript,代码行数:4,代码来源:SkriptCopy.java
示例5: register
import ch.njol.skript.lang.Condition; //导入依赖的package包/类
/**
* @param c
* @param property
* @param type must be plural
*/
public static void register(final Class<? extends Condition> c, final String property, final String type) {
Skript.registerCondition(c, "%" + type + "% (is|are) " + property, "%" + type + "% (isn't|is not|aren't|are not) " + property);
}
开发者ID:nfell2009,项目名称:Skript,代码行数:9,代码来源:PropertyCondition.java
注:本文中的ch.njol.skript.lang.Condition类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论