private static boolean changeTeamSize( CommandSender sender, Arena arena, BattleArenaController ac, String value) { try { final MinMax mm = MinMax.valueOf(value); ac.removeArena(arena); arena.getParameters().setTeamSizes(mm); ac.addArena(arena); return sendMessage(sender, "&2Altered arena team size to &6" + value); } catch (Exception e) { sendMessage(sender, "size " + value + " not found"); return false; } }
private static boolean changeType( CommandSender sender, Arena arena, BattleArenaController ac, String value) { ArenaType t = ArenaType.fromString(value); if (t == null) { sendMessage( sender, "&ctype &6" + value + "&c not found. valid types=&6" + ArenaType.getValidList()); return false; } ac.removeArena(arena); arena.getParameters().setType(t); ac.addArena(arena); sendMessage(sender, "&2Altered arena type to &6" + value); return true; }