public abstract class CommandBase extends Object implements ICommand
Constructor and Description |
---|
CommandBase() |
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCommandName, getCommandUsage, processCommand
public int getRequiredPermissionLevel()
public List getCommandAliases()
getCommandAliases
in interface ICommand
public boolean canCommandSenderUseCommand(ICommandSender par1ICommandSender)
canCommandSenderUseCommand
in interface ICommand
public List addTabCompletionOptions(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
addTabCompletionOptions
in interface ICommand
public static int parseInt(ICommandSender par0ICommandSender, String par1Str)
public static int parseIntWithMin(ICommandSender par0ICommandSender, String par1Str, int par2)
public static int parseIntBounded(ICommandSender par0ICommandSender, String par1Str, int par2, int par3)
public static double parseDouble(ICommandSender par0ICommandSender, String par1Str)
public static double func_110664_a(ICommandSender par0ICommandSender, String par1Str, double par2)
public static double func_110661_a(ICommandSender par0ICommandSender, String par1Str, double par2, double par4)
public static boolean func_110662_c(ICommandSender par0ICommandSender, String par1Str)
public static EntityPlayerMP getCommandSenderAsPlayer(ICommandSender par0ICommandSender)
public static EntityPlayerMP getPlayer(ICommandSender par0ICommandSender, String par1Str)
public static String func_96332_d(ICommandSender par0ICommandSender, String par1Str)
public static String func_82360_a(ICommandSender par0ICommandSender, String[] par1ArrayOfStr, int par2)
public static String func_82361_a(ICommandSender par0ICommandSender, String[] par1ArrayOfStr, int par2, boolean par3)
public static double func_110666_a(ICommandSender par0ICommandSender, double par1, String par3Str)
public static double func_110665_a(ICommandSender par0ICommandSender, double par1, String par3Str, int par4, int par5)
public static String joinNiceString(Object[] par0ArrayOfObj)
public static String func_96333_a(Collection par0Collection)
public static String func_110663_b(Collection par0Collection)
public static boolean doesStringStartWith(String par0Str, String par1Str)
public static List getListOfStringsMatchingLastWord(String[] par0ArrayOfStr, String... par1ArrayOfStr)
public static List getListOfStringsFromIterableMatchingLastWord(String[] par0ArrayOfStr, Iterable par1Iterable)
public boolean isUsernameIndex(String[] par1ArrayOfStr, int par2)
isUsernameIndex
in interface ICommand
public static void notifyAdmins(ICommandSender par0ICommandSender, String par1Str, Object... par2ArrayOfObj)
public static void notifyAdmins(ICommandSender par0ICommandSender, int par1, String par2Str, Object... par3ArrayOfObj)
public static void setAdminCommander(IAdminCommand par0IAdminCommand)
public int compareTo(ICommand par1ICommand)
public int compareTo(Object par1Obj)
compareTo
in interface Comparable