Package zombie.commands
Class CommandBase
java.lang.Object
zombie.commands.CommandBase
- Direct Known Subclasses:
AddAllToWhiteListCommand
,AddItemCommand
,AddUserCommand
,AddUserToWhiteListCommand
,AddVehicleCommand
,AddXPCommand
,AlarmCommand
,BanSteamIDCommand
,BanUserCommand
,ChangeOptionCommand
,ChopperCommand
,ClearCommand
,ConnectionsCommand
,CreateHordeCommand
,DebugPlayerCommand
,GodModeCommand
,GrantAdminCommand
,GunShotCommand
,HelpCommand
,InvisibleCommand
,KickUserCommand
,NoClipCommand
,PlayersCommand
,QuitCommand
,ReleaseSafehouseCommand
,ReloadLuaCommand
,ReloadOptionsCommand
,RemoveAdminCommand
,RemoveUserFromWhiteList
,SaveCommand
,SendPulseCommand
,ServerMessageCommand
,SetAccessLevelCommand
,ShowOptionsCommand
,StartRainCommand
,StopRainCommand
,TeleportCommand
,TeleportToCommand
,ThunderCommand
,UnbanSteamIDCommand
,UnbanUserCommand
,VoiceBanCommand
public abstract class CommandBase
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
argsName
protected UdpConnection
connection
protected static java.lang.String
defaultArgsName
-
Constructor Summary
Constructors Modifier Constructor Description protected
CommandBase(java.lang.String string, java.lang.String string2, java.lang.String string3, UdpConnection udpConnection)
-
Method Summary
Modifier and Type Method Description static int
accessLevelToInt(java.lang.String string)
boolean
canBeExecuted()
protected abstract java.lang.String
Command()
java.lang.String
Execute()
static java.lang.Class
findCommandCls(java.lang.String string)
protected int
getAccessLevel()
protected static java.lang.Object
getAnnotation(java.lang.Class javaClass, java.lang.Class javaClass2)
protected java.lang.String
getCommand()
java.lang.String
getCommandArg(java.lang.Integer integer)
int
getCommandArgsCount()
protected CommandArgs[]
getCommandArgVariants()
static java.lang.String
getCommandName(java.lang.Class javaClass)
protected java.lang.String
getExecutorUsername()
protected java.lang.String
getHelp()
static java.lang.String
getHelp(java.lang.Class javaClass)
protected RequiredRight
getRequiredRights()
static java.lang.Class[]
getSubClasses()
boolean
hasHelp()
boolean
hasOptionalArg(java.lang.Integer integer)
boolean
isCommandComeFromServerConsole()
static boolean
isDisabled(java.lang.Class javaClass)
boolean
isParsingSuccessful()
boolean
parseCommand()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
connection
-
argsName
protected java.lang.String argsName -
defaultArgsName
protected static final java.lang.String defaultArgsName- See Also:
- Constant Field Values
-
-
Constructor Details
-
CommandBase
protected CommandBase(java.lang.String string, java.lang.String string2, java.lang.String string3, UdpConnection udpConnection)
-
-
Method Details
-
getSubClasses
public static java.lang.Class[] getSubClasses() -
findCommandCls
public static java.lang.Class findCommandCls(java.lang.String string) -
getHelp
public static java.lang.String getHelp(java.lang.Class javaClass) -
getCommandName
public static java.lang.String getCommandName(java.lang.Class javaClass) -
isDisabled
public static boolean isDisabled(java.lang.Class javaClass) -
accessLevelToInt
public static int accessLevelToInt(java.lang.String string) -
Execute
public java.lang.String Execute() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
canBeExecuted
public boolean canBeExecuted() -
isCommandComeFromServerConsole
public boolean isCommandComeFromServerConsole() -
getRequiredRights
-
getCommandArgVariants
-
hasHelp
public boolean hasHelp() -
getHelp
protected java.lang.String getHelp() -
getCommandArg
public java.lang.String getCommandArg(java.lang.Integer integer) -
hasOptionalArg
public boolean hasOptionalArg(java.lang.Integer integer) -
getCommandArgsCount
public int getCommandArgsCount() -
Command
protected abstract java.lang.String Command() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
parseCommand
public boolean parseCommand() -
getAccessLevel
protected int getAccessLevel() -
getExecutorUsername
protected java.lang.String getExecutorUsername() -
getCommand
protected java.lang.String getCommand() -
getAnnotation
protected static java.lang.Object getAnnotation(java.lang.Class javaClass, java.lang.Class javaClass2) -
isParsingSuccessful
public boolean isParsingSuccessful()
-