@Override public boolean valid(Sign sign) { for (String line : sign.getLines()) { if (line.toLowerCase().contains(setting.toLowerCase())) { sign.addBrackets(); return true; } } return false; }
public SetMaxSpeedAction(Sign sign) { for (String line : sign.getLines()) { if (line.toLowerCase().contains("max speed")) { String[] split = line.split(":"); if (split.length != 2) continue; double percent = Double.parseDouble(StringUtils.getNumber(split[1])); percent = Math.min(percent, MinecartManiaConfiguration.getMaximumMinecartSpeedPercent()); this.percent = (int) percent; sign.addBrackets(); break; } } }
public MinimumItemAction(Sign sign) { this.items = ItemUtils.getItemStringListToMaterial(sign.getLines()); }