@Override
public void processCommand(ICommandSender sender, String[] arguments) {
if (arguments.length <= 0)
throw new WrongUsageException(StringUtil.localizeAndFormat("chat.help", this.getCommandUsage(sender)));
if (arguments[0].matches("list"))
listModes(sender, arguments);
else if (arguments[0].matches("info"))
listModeInfo(sender, arguments);
else if (arguments[0].matches("set")) {
if (arguments.length <= 1)
throw new WrongUsageException("/" + this.getCommandName() + " set [<world-#>] <mode-name>");
World world = getWorld(sender, arguments);
String desired = arguments[arguments.length - 1];
IBeekeepingMode mode = PluginApiculture.beeInterface.getBeekeepingMode(desired);
if (mode == null)
throw new CommandException(StringUtil.localize("chat.bees.command.beekeeping.error"), desired);
PluginApiculture.beeInterface.setBeekeepingMode(world, mode.getName());
func_152373_a(sender, this, StringUtil.localize("chat.bees.command.beekeeping.set"), mode.getName());
} else if (arguments[0].matches("save")) {
if (arguments.length <= 1)
throw new WrongUsageException("/" + this.getCommandName() + " save <player-name>");
saveStatistics(sender, arguments);
} else if (arguments[0].matches("help")) {
sendChatMessage(sender, StringUtil.localizeAndFormat("chat.bees.command.help.0", this.getCommandName()));
sendChatMessage(sender, StringUtil.localize("chat.bees.command.help.1"));