12345678910111213141516171819202122232425262728293031323334353637383940 |
- package me.kcm.command;
- import net.minecraft.command.ICommand;
- import net.minecraft.command.ICommandSender;
- public interface ICommandManager
- {
- /** Called to check, if a command sender should be allowed to use a normal command
- *
- * @param cs the sender of the command
- * @param perm the name of the permission, for commands this is their name
- * @return true to allow the command, false to call {@link ICommandManager#printMissingPermission(ICommandSender, ICommand)}
- */
- public boolean hasPermission(ICommandSender cs, String perm);
- /** This method is called, if there is no vanilla command available for the
- * given name
- *
- * @param cs the sender of the command
- * @param command the command
- * @param args arguments of the command, splitted at spaces
- * @return true on success, false to call {@link ICommandManager#printMissingCommand(ICommandSender, String)}
- */
- public boolean executeCustomCommand(ICommandSender cs, String command, String[] args);
-
- /** Called, if there is no normal or custom command available
- *
- * @param cs the sender of the command
- * @param command the command
- */
- public void printMissingCommand(ICommandSender cs, String command);
-
- /** Called if there is a normal command available but {@link ICommandManager#hasPermission(ICommandSender, String)}
- * returned false
- *
- * @param cs the sender of the command
- * @param command the command
- */
- public void printMissingPermission(ICommandSender cs, ICommand command);
- }
|