本文整理汇总了Java中ch.njol.skript.Skript.testing方法的典型用法代码示例。如果您正苦于以下问题:Java Skript.testing方法的具体用法?Java Skript.testing怎么用?Java Skript.testing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ch.njol.skript.Skript
的用法示例。
在下文中一共展示了Skript.testing方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: log
import ch.njol.skript.Skript; //导入方法依赖的package包/类
public static void log(final @Nullable LogEntry entry) {
if (entry == null)
return;
if (Skript.testing() && node != null && node.debug())
System.out.print("---> " + entry.level + "/" + ErrorQuality.get(entry.quality) + ": " + entry.getMessage() + " ::" + LogEntry.findCaller());
for (final LogHandler h : handlers) {
final LogResult r = h.log(entry);
switch (r) {
case CACHED:
return;
case DO_NOT_LOG:
entry.discarded("denied by " + h);
return;
case LOG:
continue;
}
}
entry.logged();
LOGGER.log(entry.getLevel(), "[Skript] " + entry.getMessage());
}
示例2: onLanguageChange
import ch.njol.skript.Skript; //导入方法依赖的package包/类
@Override
public void onLanguageChange() {
for (final Message m : messages) {
synchronized (m) {
m.revalidate = true;
}
if (firstChange && Skript.testing()) {
if (!Language.english.containsKey(m.key))
Language.missingEntryError(m.key);
}
}
firstChange = false;
}
示例3: Message
import ch.njol.skript.Skript; //导入方法依赖的package包/类
public Message(final String key) {
this.key = "" + key.toLowerCase(Locale.ENGLISH);
messages.add(this);
if (Skript.testing() && !Language.english.isEmpty()) {
if (!Language.english.containsKey(this.key))
Language.missingEntryError(this.key);
}
}
示例4: toString
import ch.njol.skript.Skript; //导入方法依赖的package包/类
@Override
public String toString() {
validate();
if (Skript.testing())
Skript.warning("Invalid use of Adjective.toString()");
return "" + def;
}
示例5: toString
import ch.njol.skript.Skript; //导入方法依赖的package包/类
@Nullable
public final static String toString(final IOException e) {
if (Language.keyExists(IO_NODE + "." + e.getClass().getSimpleName())) {
return Language.format(IO_NODE + "." + e.getClass().getSimpleName(), e.getLocalizedMessage());
}
if (Skript.testing())
e.printStackTrace();
return e.getLocalizedMessage();
}
示例6: onStop
import ch.njol.skript.Skript; //导入方法依赖的package包/类
@Override
public void onStop() {
if (!printedErrorOrLog && Skript.testing())
SkriptLogger.LOGGER.warning("Retaining log wasn't instructed to print anything at " + SkriptLogger.getCaller());
}
示例7: onStop
import ch.njol.skript.Skript; //导入方法依赖的package包/类
@Override
public void onStop() {
if (!printedErrorOrLog && Skript.testing())
SkriptLogger.LOGGER.warning("Parse log wasn't instructed to print anything at " + SkriptLogger.getCaller());
}
示例8: sqlException
import ch.njol.skript.Skript; //导入方法依赖的package包/类
void sqlException(final SQLException e) {
Skript.error("database error: " + e.getLocalizedMessage());
if (Skript.testing())
e.printStackTrace();
prepareQueries(); // a query has to be recreated after an error
}