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, CommandPlaySound, CommandServerBan, CommandServerBanIp, CommandServerBanlist, CommandServerDeop, CommandServerEmote, CommandServerKick, CommandServerList, CommandServerMessage, CommandServerOp, CommandServerPardon, CommandServerPardonIp, CommandServerPublishLocal, CommandServerSaveAll, CommandServerSaveOff, CommandServerSaveOn, CommandServerSay, CommandServerStop, CommandServerTp, CommandServerWhitelist, CommandSetPlayerTimeout, CommandSetSpawnpoint, CommandShowSeed, CommandSpreadPlayers, CommandTime, CommandToggleDownfall, CommandWeather, CommandXP, ForgeCommand, 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 double` | `func_110661_a(ICommandSender par0ICommandSender, String par1Str, double par2, double par4)`
    `static boolean` | `func_110662_c(ICommandSender par0ICommandSender, String par1Str)`
    `static String` | `func_110663_b(Collection par0Collection)`
    `static double` | `func_110664_a(ICommandSender par0ICommandSender, String par1Str, double par2)`
    `static double` | `func_110665_a(ICommandSender par0ICommandSender, double par1, String par3Str, int par4, int par5)`
    `static double` | `func_110666_a(ICommandSender par0ICommandSender, double par1, String par3Str)`
    `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 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.
    `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.
    `static EntityPlayerMP` | `getPlayer(ICommandSender par0ICommandSender, String par1Str)`
    `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 double` | `parseDouble(ICommandSender par0ICommandSender, String par1Str)` Parses a double from the given string or throws an exception if it's not a double.
    `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, getCommandUsage, processCommand`

- - ### Constructor Detail

    - #### CommandBase

          public CommandBase()

  - ### Method Detail

    - #### getRequiredPermissionLevel

          public int getRequiredPermissionLevel()

      Return the required permission level for this command.

    - #### 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.

    - #### parseDouble

          public static double parseDouble(ICommandSender par0ICommandSender,
                           String par1Str)

      Parses a double from the given string or throws an exception if it's not a double.

    - #### func_110664_a

          public static double func_110664_a(ICommandSender par0ICommandSender,
                             String par1Str,
                             double par2)

    - #### func_110661_a

          public static double func_110661_a(ICommandSender par0ICommandSender,
                             String par1Str,
                             double par2,
                             double par4)

    - #### func_110662_c

          public static boolean func_110662_c(ICommandSender par0ICommandSender,
                              String par1Str)

    - #### getCommandSenderAsPlayer

          public static EntityPlayerMP getCommandSenderAsPlayer(ICommandSender par0ICommandSender)

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

    - #### getPlayer

          public static EntityPlayerMP getPlayer(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)

    - #### func_110666_a

          public static double func_110666_a(ICommandSender par0ICommandSender,
                             double par1,
                             String par3Str)

    - #### func_110665_a

          public static double func_110665_a(ICommandSender par0ICommandSender,
                             double par1,
                             String par3Str,
                             int par4,
                             int par5)

    - #### 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)

    - #### func_110663_b

          public static String func_110663_b(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`