Package com.earth2me.essentials.commands
Class EssentialsCommand
java.lang.Object
com.earth2me.essentials.commands.EssentialsCommand
- All Implemented Interfaces:
IEssentialsCommand
- Direct Known Subclasses:
Commandafk
,Commandantioch
,Commandanvil
,Commandback
,Commandbackup
,Commandbalance
,Commandbalancetop
,Commandban
,Commandbanip
,Commandbeezooka
,Commandbigtree
,Commandbook
,Commandbottom
,Commandbreak
,Commandbroadcast
,Commandbroadcastworld
,Commandburn
,Commandcartographytable
,Commandclearinventory
,Commandclearinventoryconfirmtoggle
,Commandcompass
,Commandcondense
,Commandcreatekit
,Commandcustomtext
,Commanddelhome
,Commanddeljail
,Commanddelkit
,Commanddelwarp
,Commanddepth
,Commanddisposal
,Commandeditsign
,Commandenchant
,Commandenderchest
,Commandessentials
,Commandfireball
,Commandfirework
,Commandgc
,Commandgetpos
,Commandgrindstone
,Commandhat
,Commandhelp
,Commandhelpop
,Commandhome
,Commandignore
,Commandinfo
,Commandinvsee
,Commanditem
,Commanditemdb
,Commanditemlore
,Commanditemname
,Commandjails
,Commandjump
,Commandkick
,Commandkickall
,Commandkit
,Commandkitreset
,Commandkittycannon
,Commandlist
,Commandloom
,Commandmail
,Commandme
,Commandmore
,Commandmotd
,Commandmute
,Commandnear
,Commandnuke
,Commandpayconfirmtoggle
,Commandping
,Commandplaytime
,Commandpotion
,Commandpowertool
,Commandpowertooltoggle
,Commandr
,Commandrealname
,Commandrecipe
,Commandremove
,Commandrenamehome
,Commandrepair
,Commandrules
,Commandseen
,Commandsell
,Commandsethome
,Commandsetjail
,Commandsettpr
,Commandsetwarp
,Commandsetworth
,Commandshowkit
,Commandskull
,Commandsmithingtable
,Commandspawner
,Commandspawnmob
,Commandspeed
,Commandstonecutter
,Commandsuicide
,Commandtempban
,Commandtempbanip
,Commandthunder
,Commandtime
,Commandtogglejail
,Commandtop
,Commandtp
,Commandtpa
,Commandtpaall
,Commandtpacancel
,Commandtpaccept
,Commandtpahere
,Commandtpall
,Commandtpdeny
,Commandtphere
,Commandtpo
,Commandtpoffline
,Commandtpohere
,Commandtppos
,Commandtpr
,Commandtree
,Commandunban
,Commandunbanip
,Commandunlimited
,Commandwarp
,Commandwarpinfo
,Commandweather
,Commandwhois
,Commandworkbench
,Commandworld
,Commandworth
,EssentialsLoopCommand
,EssentialsToggleCommand
-
Field Summary
Modifier and TypeFieldDescriptionCommon date diffs, for use in tab completionCommon time durations (in seconds), for use in tab completion.protected IEssentials
protected IEssentialsModule
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCommands
(Server server) Lists all commands.static String
getFinalArg
(String[] args, int start) getItems()
Gets a list of tab-completable items that start with the given name.getMatchingItems
(String arg) Gets a list of tab-completable items usable for "getMatching".getName()
getNewExceptionFuture
(CommandSource sender, String commandLabel) protected User
getPlayer
(Server server, CommandSource sender, String searchTerm) protected User
getPlayer
(Server server, CommandSource sender, String[] args, int pos) protected User
getPlayer
(Server server, CommandSource sender, String[] args, int pos, boolean getOffline) protected User
protected User
protected User
protected User
getPlayers
(Server server, CommandSource interactor) Gets a list of all player names that can be seen with by the given CommandSource, for tab completion.getPlayers
(Server server, User interactor) Gets a list of all player names that can be seen with by the given User, for tab completion.getPlugins
(Server server) Lists all plugin namesgetTabCompleteOptions
(Server server, CommandSource sender, String commandLabel, String[] args) getTabCompleteOptions
(Server server, User user, String commandLabel, String[] args) protected void
run
(Server server, CommandSource sender, String commandLabel, String[] args) final void
protected void
final void
void
setEssentials
(IEssentials ess) void
setEssentialsModule
(IEssentialsModule module) void
showError
(CommandSender sender, Throwable throwable, String commandLabel) tabComplete
(Server server, CommandSource sender, String commandLabel, Command cmd, String[] args) tabCompleteCommand
(CommandSource sender, Server server, String label, String[] args, int index) Attempts to tab-complete a command or its arguments.
-
Field Details
-
COMMON_DURATIONS
Common time durations (in seconds), for use in tab completion. -
COMMON_DATE_DIFFS
Common date diffs, for use in tab completion -
ess
-
module
-
-
Constructor Details
-
EssentialsCommand
-
-
Method Details
-
getUsageStrings
- Specified by:
getUsageStrings
in interfaceIEssentialsCommand
-
getFinalArg
-
setEssentials
- Specified by:
setEssentials
in interfaceIEssentialsCommand
-
setEssentialsModule
- Specified by:
setEssentialsModule
in interfaceIEssentialsCommand
-
getName
- Specified by:
getName
in interfaceIEssentialsCommand
-
getPlayer
protected User getPlayer(Server server, CommandSource sender, String[] args, int pos) throws PlayerNotFoundException, NotEnoughArgumentsException -
getPlayer
protected User getPlayer(Server server, CommandSource sender, String[] args, int pos, boolean getOffline) throws PlayerNotFoundException, NotEnoughArgumentsException -
getPlayer
protected User getPlayer(Server server, CommandSource sender, String searchTerm) throws PlayerNotFoundException, NotEnoughArgumentsException -
getPlayer
protected User getPlayer(Server server, User user, String[] args, int pos) throws PlayerNotFoundException, NotEnoughArgumentsException -
getPlayer
protected User getPlayer(Server server, User user, String[] args, int pos, boolean getOffline) throws PlayerNotFoundException, NotEnoughArgumentsException -
getPlayer
protected User getPlayer(Server server, String[] args, int pos, boolean getHidden, boolean getOffline) throws PlayerNotFoundException, NotEnoughArgumentsException -
getPlayer
protected User getPlayer(Server server, String searchTerm, boolean getHidden, boolean getOffline) throws PlayerNotFoundException - Throws:
PlayerNotFoundException
-
run
public final void run(Server server, User user, String commandLabel, Command cmd, String[] args) throws Exception - Specified by:
run
in interfaceIEssentialsCommand
- Throws:
Exception
-
run
- Throws:
Exception
-
run
public final void run(Server server, CommandSource sender, String commandLabel, Command cmd, String[] args) throws Exception - Specified by:
run
in interfaceIEssentialsCommand
- Throws:
Exception
-
run
protected void run(Server server, CommandSource sender, String commandLabel, String[] args) throws Exception - Throws:
Exception
-
tabComplete
public final List<String> tabComplete(Server server, User user, String commandLabel, Command cmd, String[] args) - Specified by:
tabComplete
in interfaceIEssentialsCommand
-
getTabCompleteOptions
-
tabComplete
public final List<String> tabComplete(Server server, CommandSource sender, String commandLabel, Command cmd, String[] args) - Specified by:
tabComplete
in interfaceIEssentialsCommand
-
getTabCompleteOptions
-
getPlayers
Gets a list of all player names that can be seen with by the given CommandSource, for tab completion. -
getPlayers
Gets a list of all player names that can be seen with by the given User, for tab completion. -
getItems
Gets a list of tab-completable items that start with the given name. Due to the number of items, this may not return the entire list. -
getMatchingItems
Gets a list of tab-completable items usable for "getMatching". -
getCommands
Lists all commands. -
getPlugins
Lists all plugin names- Parameters:
server
- Server instance- Returns:
- List of plugin names
-
tabCompleteCommand
protected final List<String> tabCompleteCommand(CommandSource sender, Server server, String label, String[] args, int index) Attempts to tab-complete a command or its arguments. -
showError
- Specified by:
showError
in interfaceIEssentialsCommand
-
getNewExceptionFuture
-