2015-05-09 14:42:47 +02:00
|
|
|
package techreborn.command;
|
|
|
|
|
|
|
|
|
|
|
|
import net.minecraft.command.CommandBase;
|
|
|
|
import net.minecraft.command.ICommandSender;
|
2015-06-17 18:01:26 +02:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2015-05-09 14:42:47 +02:00
|
|
|
import net.minecraft.util.ChatComponentText;
|
2015-06-08 16:45:21 +02:00
|
|
|
import techreborn.api.recipe.RecipeHandler;
|
2015-06-17 18:01:26 +02:00
|
|
|
import techreborn.packets.PacketHandler;
|
|
|
|
import techreborn.tiles.idsu.IDSUManager;
|
2015-05-09 14:42:47 +02:00
|
|
|
|
|
|
|
public class TechRebornDevCommand extends CommandBase {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getCommandName() {
|
|
|
|
return "trdev";
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getCommandUsage(ICommandSender icommandsender) {
|
|
|
|
return "commands.forge.usage";
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getRequiredPermissionLevel() {
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void processCommand(ICommandSender sender, String[] args) {
|
|
|
|
if (args.length == 0) {
|
|
|
|
sender.addChatMessage(new ChatComponentText("You need to use arguments"));
|
|
|
|
} else if ("help".equals(args[0])) {
|
2015-06-17 18:01:26 +02:00
|
|
|
sender.addChatMessage(new ChatComponentText("recipes - Shows size of the recipe array"));
|
|
|
|
sender.addChatMessage(new ChatComponentText("idsu - Resyncs the idsu server instance to the senders client"));
|
2015-05-09 14:42:47 +02:00
|
|
|
} else if ("recipes".equals(args[0])) {
|
2015-06-08 16:45:21 +02:00
|
|
|
sender.addChatMessage(new ChatComponentText(RecipeHandler.recipeList.size() + " recipes loaded"));
|
2015-06-17 18:01:26 +02:00
|
|
|
} else if ("idsu".equals(args[0])){
|
|
|
|
PacketHandler.sendPacketToPlayer(IDSUManager.INSTANCE.getPacket(sender.getEntityWorld(), (EntityPlayer) sender), (EntityPlayer) sender);
|
2015-05-09 14:42:47 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|