@Override public void verify(ChangedSign sign) throws ICVerificationException { String[] splitLine3 = RegexUtil.ASTERISK_PATTERN.split(sign.getLine(3).trim()); if (EntityType.fromName(splitLine3[0].trim().toLowerCase()) == null) { throw new ICVerificationException("Invalid Entity! See bukkit EntityType list!"); } else if (!EntityType.fromName(splitLine3[0].trim().toLowerCase()).isSpawnable()) { throw new ICVerificationException("Entity is not spawnable!"); } }
@Override public void load() { String[] splitLine3 = RegexUtil.ASTERISK_PATTERN.split(getSign().getLine(3).trim()); type = EntityType.fromName(splitLine3[0].trim().toLowerCase()); if (type == null) { type = EntityType.PIG; } try { amount = Integer.parseInt(splitLine3[1]); } catch (Exception e) { amount = 1; } location = ICUtil.parseBlockLocation(getSign(), 2).getLocation(); }