@SuppressWarnings("null") public String toString(final int flags) { final Noun name = info.names[matchedPattern]; return baby.isTrue() ? m_baby.toString(name, flags) : baby.isFalse() ? m_adult.toString(name, flags) : name.toString(flags); }
@Nullable public E spawn(final Location loc) { assert loc != null; try { final E e = loc.getWorld().spawn(loc, getType()); if (e == null) throw new IllegalArgumentException(); if (baby.isTrue() && e instanceof Ageable) ((Ageable) e).setBaby(); set(e); return e; } catch (final IllegalArgumentException e) { if (Skript.testing()) Skript.error("Can't spawn " + getType().getName()); return null; } }
@Nullable protected Adjective getAgeAdjective() { return baby.isTrue() ? m_baby : baby.isFalse() ? m_adult : null; }