2016-03-14 19:00:03 -07:00
|
|
|
package WayofTime.bloodmagic.command;
|
|
|
|
|
|
|
|
import WayofTime.bloodmagic.command.sub.SubCommandBind;
|
|
|
|
import WayofTime.bloodmagic.command.sub.SubCommandNetwork;
|
|
|
|
import WayofTime.bloodmagic.command.sub.SubCommandOrb;
|
|
|
|
import WayofTime.bloodmagic.util.helper.TextHelper;
|
|
|
|
import net.minecraft.command.ICommandSender;
|
2016-03-17 13:00:44 -07:00
|
|
|
import net.minecraft.util.text.TextComponentString;
|
2017-01-01 21:43:34 -08:00
|
|
|
import net.minecraftforge.server.command.CommandTreeBase;
|
2016-03-14 19:00:03 -07:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public class CommandBloodMagic extends CommandTreeBase {
|
|
|
|
public CommandBloodMagic() {
|
2017-01-01 21:43:34 -08:00
|
|
|
addSubcommand(new SubCommandBind());
|
|
|
|
addSubcommand(new SubCommandNetwork());
|
|
|
|
addSubcommand(new SubCommandOrb());
|
2016-03-14 19:00:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2017-08-15 21:30:48 -07:00
|
|
|
public String getName() {
|
2017-01-01 21:43:34 -08:00
|
|
|
return "bloodmagic";
|
2016-03-14 19:00:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2017-08-15 21:30:48 -07:00
|
|
|
public String getUsage(ICommandSender sender) {
|
2017-01-01 21:43:34 -08:00
|
|
|
return "/bloodmagic help";
|
2016-03-14 19:00:03 -07:00
|
|
|
}
|
|
|
|
|
2017-04-03 17:03:46 -07:00
|
|
|
@Override
|
2017-08-15 21:30:48 -07:00
|
|
|
public int getRequiredPermissionLevel() {
|
2017-04-03 17:03:46 -07:00
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void displayHelpString(ICommandSender commandSender, String display, Object... info) {
|
2017-01-01 21:43:34 -08:00
|
|
|
commandSender.sendMessage(new TextComponentString(TextHelper.localizeEffect(display, info)));
|
2016-03-14 19:00:03 -07:00
|
|
|
}
|
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void displayErrorString(ICommandSender commandSender, String display, Object... info) {
|
2017-01-01 21:43:34 -08:00
|
|
|
commandSender.sendMessage(new TextComponentString(TextHelper.localizeEffect(display, info)));
|
2016-03-14 19:00:03 -07:00
|
|
|
}
|
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void displaySuccessString(ICommandSender commandSender, String display, Object... info) {
|
2017-01-01 21:43:34 -08:00
|
|
|
commandSender.sendMessage(new TextComponentString(TextHelper.localizeEffect(display, info)));
|
2016-03-14 19:00:03 -07:00
|
|
|
}
|
|
|
|
}
|