@Override public boolean valid(Sign sign) { if (sign.getLine(0).toLowerCase().contains("min item")) { sign.addBrackets(); return true; } return false; }
@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; } } }