Files
Opis/mcp/mobius/opis/commands/server/CommandHelp.java
T
ProfMobius 8a2c5acfe0 Fixed commands
Fixed TickHandler
Fixed other things
Added a all param to the getnent
Bumped version
2014-03-10 13:22:03 +01:00

79 lines
1.9 KiB
Java

package mcp.mobius.opis.commands.server;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player;
import mcp.mobius.opis.commands.IOpisCommand;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.MemoryConnection;
import net.minecraft.network.packet.Packet3Chat;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.dedicated.DedicatedServer;
import net.minecraft.util.ChatMessageComponent;
public class CommandHelp extends CommandBase implements IOpisCommand {
@Override
public String getCommandName() {
return "opis_help";
}
@Override
public String getCommandNameOpis() {
return this.getCommandName();
}
@Override
public String getCommandUsage(ICommandSender icommandsender) {
return "";
}
@Override
public void processCommand(ICommandSender icommandsender, String[] astring) {
IOpisCommand[] commands = {
new CommandStart(),
new CommandStop(),
new CommandReset(),
new CommandFrequency(),
new CommandTicks(),
new CommandChunkList(),
new CommandTimingTileEntities(),
new CommandMeanModTime(),
new CommandTimingEntities(),
new CommandAmountEntities(),
new CommandDataDump(),
new CommandKill(),
new CommandKillAll(),
new CommandHandler()
};
for (IOpisCommand cmd : commands)
icommandsender.sendChatToPlayer(ChatMessageComponent.createFromText(String.format("/%s : %s", cmd.getCommandNameOpis(), cmd.getDescription())));
}
@Override
public int getRequiredPermissionLevel()
{
return 3;
}
@Override
public boolean canCommandSenderUseCommand(ICommandSender sender)
{
return true;
}
@Override
public String getDescription() {
return "This message.";
}
}