net.minecraft.command

## Class CommandBase

- java.lang.Object
- - net.minecraft.command.CommandBase

- All Implemented Interfaces:
    Comparable, ICommand
  Direct Known Subclasses:
    CommandClearInventory, CommandDebug, CommandDifficulty, CommandEffect, CommandEnchant, CommandGameMode, CommandGameRule, CommandGive, CommandHelp, CommandKill, CommandServerBan, CommandServerBanIp, CommandServerBanlist, CommandServerDeop, CommandServerEmote, CommandServerKick, CommandServerList, CommandServerMessage, CommandServerOp, CommandServerPardon, CommandServerPardonIp, CommandServerPublishLocal, CommandServerSaveAll, CommandServerSaveOff, CommandServerSaveOn, CommandServerSay, CommandServerStop, CommandServerTp, CommandServerWhitelist, CommandSetSpawnpoint, CommandShowSeed, CommandTime, CommandToggleDownfall, CommandWeather, CommandXP, ServerCommandScoreboard, ServerCommandTestFor

      public abstract class CommandBase
      extends Object
      implements ICommand

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommandBase()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List` | `addTabCompletionOptions(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)` Adds the strings available in this command to the given list of tab completion options.
    `boolean` | `canCommandSenderUseCommand(ICommandSender par1ICommandSender)` Returns true if the given command sender is allowed to use this command.
    `int` | `compareTo(ICommand par1ICommand)` Compares the name of this command to the name of the given command.
    `int` | `compareTo(Object par1Obj)`
    `static boolean` | `doesStringStartWith(String par0Str, String par1Str)` Returns true if the given substring is exactly equal to the start of the given string (case insensitive).
    `static EntityPlayerMP` | `func_82359_c(ICommandSender par0ICommandSender, String par1Str)`
    `static String` | `func_82360_a(ICommandSender par0ICommandSender, String[] par1ArrayOfStr, int par2)`
    `static String` | `func_82361_a(ICommandSender par0ICommandSender, String[] par1ArrayOfStr, int par2, boolean par3)`
    `static double` | `func_82363_b(ICommandSender par0ICommandSender, String par1Str)`
    `static String` | `func_96332_d(ICommandSender par0ICommandSender, String par1Str)`
    `static String` | `func_96333_a(Collection par0Collection)`
    `List` | `getCommandAliases()`
    `static EntityPlayerMP` | `getCommandSenderAsPlayer(ICommandSender par0ICommandSender)` Returns the given ICommandSender as a EntityPlayer or throw an exception.
    `String` | `getCommandUsage(ICommandSender par1ICommandSender)`
    `static List` | `getListOfStringsFromIterableMatchingLastWord(String[] par0ArrayOfStr, Iterable par1Iterable)` Returns a List of strings (chosen from the given string iterable) which the last word in the given string array is a beginning-match for.
    `static List` | `getListOfStringsMatchingLastWord(String[] par0ArrayOfStr, String... par1ArrayOfStr)` Returns a List of strings (chosen from the given strings) which the last word in the given string array is a beginning-match for.
    `int` | `getRequiredPermissionLevel()` Return the required permission level for this command.
    `boolean` | `isUsernameIndex(String[] par1ArrayOfStr, int par2)` Return whether the specified command parameter index is a username parameter.
    `static String` | `joinNiceString(Object[] par0ArrayOfObj)` Joins the given string array into a "x, y, and z" seperated string.
    `static void` | `notifyAdmins(ICommandSender par0ICommandSender, int par1, String par2Str, Object... par3ArrayOfObj)`
    `static void` | `notifyAdmins(ICommandSender par0ICommandSender, String par1Str, Object... par2ArrayOfObj)`
    `static int` | `parseInt(ICommandSender par0ICommandSender, String par1Str)` Parses an int from the given string.
    `static int` | `parseIntBounded(ICommandSender par0ICommandSender, String par1Str, int par2, int par3)` Parses an int from the given string within a specified bound.
    `static int` | `parseIntWithMin(ICommandSender par0ICommandSender, String par1Str, int par2)` Parses an int from the given sring with a specified minimum.
    `static void` | `setAdminCommander(IAdminCommand par0IAdminCommand)` Sets the static IAdminCommander.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.minecraft.command.ICommand

      `getCommandName, processCommand`

- - ### Constructor Detail

    - #### CommandBase

          public CommandBase()

  - ### Method Detail

    - #### getRequiredPermissionLevel

          public int getRequiredPermissionLevel()

      Return the required permission level for this command.

    - #### getCommandUsage

          public String getCommandUsage(ICommandSender par1ICommandSender)

      Specified by:
        `getCommandUsage` in interface `ICommand`

    - #### getCommandAliases

          public List getCommandAliases()

      Specified by:
        `getCommandAliases` in interface `ICommand`

    - #### canCommandSenderUseCommand

          public boolean canCommandSenderUseCommand(ICommandSender par1ICommandSender)

      Returns true if the given command sender is allowed to use this command.
      Specified by:
        `canCommandSenderUseCommand` in interface `ICommand`

    - #### addTabCompletionOptions

          public List addTabCompletionOptions(ICommandSender par1ICommandSender,
                                     String[] par2ArrayOfStr)

      Adds the strings available in this command to the given list of tab completion options.
      Specified by:
        `addTabCompletionOptions` in interface `ICommand`

    - #### parseInt

          public static int parseInt(ICommandSender par0ICommandSender,
                     String par1Str)

      Parses an int from the given string.

    - #### parseIntWithMin

          public static int parseIntWithMin(ICommandSender par0ICommandSender,
                            String par1Str,
                            int par2)

      Parses an int from the given sring with a specified minimum.

    - #### parseIntBounded

          public static int parseIntBounded(ICommandSender par0ICommandSender,
                            String par1Str,
                            int par2,
                            int par3)

      Parses an int from the given string within a specified bound.

    - #### func_82363_b

          public static double func_82363_b(ICommandSender par0ICommandSender,
                            String par1Str)

    - #### getCommandSenderAsPlayer

          public static EntityPlayerMP getCommandSenderAsPlayer(ICommandSender par0ICommandSender)

      Returns the given ICommandSender as a EntityPlayer or throw an exception.

    - #### func_82359_c

          public static EntityPlayerMP func_82359_c(ICommandSender par0ICommandSender,
                                    String par1Str)

    - #### func_96332_d

          public static String func_96332_d(ICommandSender par0ICommandSender,
                            String par1Str)

    - #### func_82360_a

          public static String func_82360_a(ICommandSender par0ICommandSender,
                            String[] par1ArrayOfStr,
                            int par2)

    - #### func_82361_a

          public static String func_82361_a(ICommandSender par0ICommandSender,
                            String[] par1ArrayOfStr,
                            int par2,
                            boolean par3)

    - #### joinNiceString

          public static String joinNiceString(Object[] par0ArrayOfObj)

      Joins the given string array into a "x, y, and z" seperated string.

    - #### func_96333_a

          public static String func_96333_a(Collection par0Collection)

    - #### doesStringStartWith

          public static boolean doesStringStartWith(String par0Str,
                                    String par1Str)

      Returns true if the given substring is exactly equal to the start of the given string (case insensitive).

    - #### getListOfStringsMatchingLastWord

          public static List getListOfStringsMatchingLastWord(String[] par0ArrayOfStr,
                                              String... par1ArrayOfStr)

      Returns a List of strings (chosen from the given strings) which the last word in the given string array is a beginning-match for. (Tab completion).

    - #### getListOfStringsFromIterableMatchingLastWord

          public static List getListOfStringsFromIterableMatchingLastWord(String[] par0ArrayOfStr,
                                                          Iterable par1Iterable)

      Returns a List of strings (chosen from the given string iterable) which the last word in the given string array is a beginning-match for. (Tab completion).

    - #### isUsernameIndex

          public boolean isUsernameIndex(String[] par1ArrayOfStr,
                                int par2)

      Return whether the specified command parameter index is a username parameter.
      Specified by:
        `isUsernameIndex` in interface `ICommand`

    - #### notifyAdmins

          public static void notifyAdmins(ICommandSender par0ICommandSender,
                          String par1Str,
                          Object... par2ArrayOfObj)

    - #### notifyAdmins

          public static void notifyAdmins(ICommandSender par0ICommandSender,
                          int par1,
                          String par2Str,
                          Object... par3ArrayOfObj)

    - #### setAdminCommander

          public static void setAdminCommander(IAdminCommand par0IAdminCommand)

      Sets the static IAdminCommander.

    - #### compareTo

          public int compareTo(ICommand par1ICommand)

      Compares the name of this command to the name of the given command.

    - #### compareTo

          public int compareTo(Object par1Obj)

      Specified by:
        `compareTo` in interface `Comparable`