Localize new commands + Add an Orb command

This commit is contained in:
Nick 2015-10-12 12:44:15 -07:00
parent 80b76a2dbb
commit 6e54f83ebd
7 changed files with 204 additions and 35 deletions

View file

@ -4,9 +4,11 @@ import WayofTime.alchemicalWizardry.api.command.ISubCommand;
import WayofTime.alchemicalWizardry.common.commands.sub.SubCommandBind;
import WayofTime.alchemicalWizardry.common.commands.sub.SubCommandHelp;
import WayofTime.alchemicalWizardry.common.commands.sub.SubCommandNetwork;
import WayofTime.alchemicalWizardry.common.commands.sub.SubCommandOrb;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
@ -27,6 +29,7 @@ public class CommandBloodMagic extends CommandBase {
subCommands.put("help", new SubCommandHelp(this));
subCommands.put("network", new SubCommandNetwork(this));
subCommands.put("bind", new SubCommandBind(this));
subCommands.put("orb", new SubCommandOrb(this));
}
@Override
@ -59,9 +62,9 @@ public class CommandBloodMagic extends CommandBase {
if (subCommand.canSenderUseSubCommand(commandSender))
subCommand.processSubCommand(commandSender, subArgs);
else
commandSender.addChatMessage(new ChatComponentText("You do not have permission to use this command.").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
commandSender.addChatMessage(new ChatComponentTranslation("commands.error.perm").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
} else {
commandSender.addChatMessage(new ChatComponentText("Unknown command!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
commandSender.addChatMessage(new ChatComponentTranslation("commands.error.unknown").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
}
}