Java Code Examples for ch.njol.skript.registrations.Classes#getDebugMessage()
The following examples show how to use
ch.njol.skript.registrations.Classes#getDebugMessage() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExprLoopYaml.java From skript-yaml with MIT License | 5 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { //TODO if (e == null) return name; if (isYamlLoop) { final Object current = loop.getCurrent(e); Object[] objects = ((ExprYaml<?>) loop.getLoopedExpression()).get(e); if (current == null || objects == null) return Classes.getDebugMessage(null); return loopState == LoopState.INDEX ? "\"" + getIndex() + "\"" : Classes.getDebugMessage(current); } return Classes.getDebugMessage(loop.getCurrent(e)); }
Example 2
Source File: ExprLoopValue.java From Skript with GNU General Public License v3.0 | 5 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { if (e == null) return name; if (isVariableLoop) { @SuppressWarnings("unchecked") final Entry<String, Object> current = (Entry<String, Object>) loop.getCurrent(e); if (current == null) return Classes.getDebugMessage(null); return isIndex ? "\"" + current.getKey() + "\"" : Classes.getDebugMessage(current.getValue()); } return Classes.getDebugMessage(loop.getCurrent(e)); }
Example 3
Source File: EventValueExpression.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { if (!debug || e == null) return "event-" + Classes.getSuperClassInfo(c).getName(); return Classes.getDebugMessage(getValue(e)); }
Example 4
Source File: ExprTargetedBlock.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { if (e == null) return "the targeted block" + (getExpr().isSingle() ? "" : "s") + " of " + getExpr().toString(e, debug); return Classes.getDebugMessage(getAll(e)); }
Example 5
Source File: ExprAttacked.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { if (e == null) return "the attacked " + type; return Classes.getDebugMessage(getSingle(e)); }
Example 6
Source File: ExprSeed.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event event, final boolean debug) { if (event == null) return "the seed of " + getExpr().toString(event, debug); return Classes.getDebugMessage(getAll(event)); }
Example 7
Source File: ExprTime.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event event, final boolean debug) { if (event == null) return "the time in " + getExpr().toString(event, debug); return Classes.getDebugMessage(getAll(event)); }
Example 8
Source File: ExprTarget.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { if (e == null) return "the target" + (type == null ? "" : "ed " + type) + (getExpr().isDefault() ? "" : " of " + getExpr().toString(e, debug)); return Classes.getDebugMessage(getAll(e)); }
Example 9
Source File: ExprFurnaceSlot.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { if (e == null) return "the " + (getTime() == -1 ? "past " : getTime() == 1 ? "future " : "") + slotNames[slot] + " slot of " + getExpr().toString(e, debug); return Classes.getDebugMessage(getSingle(e)); }
Example 10
Source File: ExprAttacker.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { if (e == null) return "the attacker"; return Classes.getDebugMessage(getSingle(e)); }
Example 11
Source File: ExprTool.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { if (e == null) return "the " + (getTime() == 1 ? "future " : getTime() == -1 ? "former " : "") + "tool of " + getExpr().toString(e, debug); return Classes.getDebugMessage(getSingle(e)); }
Example 12
Source File: ExprArgument.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { if (e == null) return "the " + StringUtils.fancyOrderNumber(arg.getIndex() + 1) + " argument"; return Classes.getDebugMessage(getArray(e)); }