use of com.elmakers.mine.bukkit.arena.DefaultStage in project MagicPlugin by elBukkit.
the class ArenaCommandExecutor method onNameArenaStage.
protected void onNameArenaStage(CommandSender sender, Arena arena, String[] args) {
EditingStage stage = arena.getEditingStage();
if (stage instanceof DefaultStage) {
sender.sendMessage(ChatColor.RED + "Can't rename default stage");
return;
}
if (args.length == 0) {
stage.setName(null);
sender.sendMessage("Cleared name of " + ChatColor.YELLOW + stage.getName());
return;
}
String name = StringUtils.join(args, " ");
stage.setName(name);
sender.sendMessage("Set name to " + ChatColor.YELLOW + stage.getName());
}
Aggregations