diff --git a/mcp/mobius/opis/commands/server/CommandAddPrivileged.java b/mcp/mobius/opis/commands/server/CommandAddPrivileged.java index 260e99e..1ecf543 100644 --- a/mcp/mobius/opis/commands/server/CommandAddPrivileged.java +++ b/mcp/mobius/opis/commands/server/CommandAddPrivileged.java @@ -1,5 +1,6 @@ package mcp.mobius.opis.commands.server; +import mcp.mobius.opis.commands.IOpisCommand; import mcp.mobius.opis.server.PlayerTracker; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; @@ -8,7 +9,7 @@ import net.minecraft.network.MemoryConnection; import net.minecraft.server.dedicated.DedicatedServer; import net.minecraft.util.ChatMessageComponent; -public class CommandAddPrivileged extends CommandBase { +public class CommandAddPrivileged extends CommandBase implements IOpisCommand{ @Override public String getCommandName() { @@ -40,4 +41,14 @@ public class CommandAddPrivileged extends CommandBase { if (!(sender instanceof DedicatedServer) && !(sender instanceof EntityPlayerMP)) return true; return PlayerTracker.instance().isTrueOP(((EntityPlayerMP)sender).username); } + + @Override + public String getDescription() { + return "Add a user to the privileged list of users."; + } + + @Override + public String getCommandNameOpis() { + return "opis_addpriv"; + } } diff --git a/mcp/mobius/opis/commands/server/CommandHelp.java b/mcp/mobius/opis/commands/server/CommandHelp.java index 95dbb33..e3dbcb8 100644 --- a/mcp/mobius/opis/commands/server/CommandHelp.java +++ b/mcp/mobius/opis/commands/server/CommandHelp.java @@ -51,7 +51,10 @@ public class CommandHelp extends CommandBase implements IOpisCommand { new CommandKill(), new CommandKillAll(), - new CommandHandler() + new CommandHandler(), + + new CommandAddPrivileged(), + new CommandRmPrivileged() }; for (IOpisCommand cmd : commands) diff --git a/mcp/mobius/opis/commands/server/CommandRmPrivileged.java b/mcp/mobius/opis/commands/server/CommandRmPrivileged.java index e201224..6c325c8 100644 --- a/mcp/mobius/opis/commands/server/CommandRmPrivileged.java +++ b/mcp/mobius/opis/commands/server/CommandRmPrivileged.java @@ -1,5 +1,6 @@ package mcp.mobius.opis.commands.server; +import mcp.mobius.opis.commands.IOpisCommand; import mcp.mobius.opis.server.PlayerTracker; import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; @@ -8,7 +9,7 @@ import net.minecraft.network.MemoryConnection; import net.minecraft.server.dedicated.DedicatedServer; import net.minecraft.util.ChatMessageComponent; -public class CommandRmPrivileged extends CommandBase{ +public class CommandRmPrivileged extends CommandBase implements IOpisCommand{ @Override public String getCommandName() { @@ -28,9 +29,6 @@ public class CommandRmPrivileged extends CommandBase{ } else { icommandsender.sendChatToPlayer(ChatMessageComponent.createFromText(String.format("Player %s not found in list.", astring[0]))); } - - - } @Override @@ -47,4 +45,14 @@ public class CommandRmPrivileged extends CommandBase{ if (!(sender instanceof DedicatedServer) && !(sender instanceof EntityPlayerMP)) return true; return PlayerTracker.instance().isTrueOP(((EntityPlayerMP)sender).username); } + + @Override + public String getDescription() { + return "Remove a user from the privileged list of users."; + } + + @Override + public String getCommandNameOpis() { + return "opis_rmpriv"; + } }