Java Code Examples for ch.njol.skript.registrations.Classes#toString()
The following examples show how to use
ch.njol.skript.registrations.Classes#toString() .
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: InventorySlot.java From Skript with GNU General Public License v3.0 | 5 votes |
@Override public String toString(@Nullable Event e, boolean debug) { InventoryHolder holder = invi.getHolder(); if (holder instanceof BlockState) holder = new BlockInventoryHolder((BlockState) holder); if (invi.getHolder() != null) { if (invi instanceof CraftingInventory) // 4x4 crafting grid is contained in player too! return "crafting slot " + index + " of " + Classes.toString(holder); return "inventory slot " + index + " of " + Classes.toString(holder); } return "inventory slot " + index + " of " + Classes.toString(invi); }
Example 2
Source File: EquipmentSlot.java From Skript with GNU General Public License v3.0 | 5 votes |
@Override public String toString(@Nullable Event event, boolean debug) { if (slotToString) // Slot to string return "the " + slot.name().toLowerCase(Locale.ENGLISH) + " of " + Classes.toString(e.getHolder()); // TODO localise? else // Contents of slot to string return Classes.toString(getItem()); }
Example 3
Source File: Variable.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 Classes.toString(get(e)); return "{" + (local ? "_" : "") + StringUtils.substring(name.toString(e, debug), 1, -1) + "}" + (debug ? "(as " + superType.getName() + ")" : ""); }
Example 4
Source File: ConvertedLiteral.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { return Classes.toString(data, getAnd()); }
Example 5
Source File: SimpleLiteral.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) return "[" + Classes.toString(data, getAnd(), StringMode.DEBUG) + "]"; return Classes.toString(data, getAnd()); }
Example 6
Source File: EvtAtTime.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { return "at " + Time.toString(tick) + " in worlds " + Classes.toString(worlds, true); }
Example 7
Source File: EvtBlock.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { return "break/place/burn/fade/form of " + Classes.toString(types); }
Example 8
Source File: EvtEntity.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { return "death/spawn" + (types != null ? " of " + Classes.toString(types, false) : ""); }
Example 9
Source File: EvtMoveOn.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(final @Nullable Event e, final boolean debug) { return "walk on " + Classes.toString(types, false); // return "walk on " + (types != null ? Skript.toString(types, false) : "<block:" + world.getName() + ":" + x + "," + y + "," + z + ">"); }
Example 10
Source File: CursorSlot.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(@Nullable Event e, boolean debug) { return "cursor slot of " + Classes.toString(player); }
Example 11
Source File: DroppedItemSlot.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(@Nullable Event e, boolean debug) { return Classes.toString(getItem()); }
Example 12
Source File: ItemFrameSlot.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public String toString(@Nullable Event e, boolean debug) { return Classes.toString(getItem()); }