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,CreateHorde2Command,CreateHordeCommand,DebugPlayerCommand,GodModeCommand,GrantAdminCommand,GunShotCommand,HelpCommand,InvisibleCommand,KickUserCommand,NoClipCommand,PlayersCommand,QuitCommand,ReleaseSafehouseCommand,ReloadLuaCommand,ReloadOptionsCommand,RemoveAdminCommand,RemoveUserFromWhiteList,RemoveZombiesCommand,ReplayCommands,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.StringargsNameprotected UdpConnectionconnectionprotected static java.lang.StringdefaultArgsName -
Constructor Summary
Constructors Modifier Constructor Description protectedCommandBase(java.lang.String string, java.lang.String string2, java.lang.String string3, UdpConnection udpConnection) -
Method Summary
Modifier and Type Method Description static intaccessLevelToInt(java.lang.String string)booleancanBeExecuted()protected abstract java.lang.StringCommand()java.lang.StringExecute()static java.lang.ClassfindCommandCls(java.lang.String string)protected intgetAccessLevel()protected static java.lang.ObjectgetAnnotation(java.lang.Class javaClass, java.lang.Class javaClass2)protected java.lang.StringgetCommand()java.lang.StringgetCommandArg(java.lang.Integer integer)intgetCommandArgsCount()protected CommandArgs[]getCommandArgVariants()static java.lang.StringgetCommandName(java.lang.Class javaClass)protected java.lang.StringgetExecutorUsername()protected java.lang.StringgetHelp()static java.lang.StringgetHelp(java.lang.Class javaClass)protected RequiredRightgetRequiredRights()static java.lang.Class[]getSubClasses()booleanhasHelp()booleanhasOptionalArg(java.lang.Integer integer)booleanisCommandComeFromServerConsole()static booleanisDisabled(java.lang.Class javaClass)booleanisParsingSuccessful()booleanparseCommand()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()
-