Package net.ME1312.Galaxi.Command
Class CommandProcessor
java.lang.Object
net.ME1312.Galaxi.Command.CommandProcessor
Galaxi Command Processor Class
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncomplete
(CommandSender sender, String command) Complete a commandescapeArguments
(String... args) Escapes some argumentsabstract String
escapeArguments
(String[] args, boolean literal, boolean whitespaced) Escapes some argumentsescapeCommand
(String label, String... args) Escapes a commandabstract String
escapeCommand
(String label, String[] args, boolean literal, boolean whitespaced) Escapes a commandabstract CommandProcessor.Status
runCommand
(CommandSender sender, String command) Run a command
-
Constructor Details
-
CommandProcessor
public CommandProcessor()
-
-
Method Details
-
complete
Complete a command- Parameters:
command
- Command- Returns:
- Auto Completions
-
runCommand
Run a command- Parameters:
sender
- Command Sendercommand
- Command- Returns:
- Whether the command was run
-
escapeCommand
Escapes a command- Parameters:
label
- Command Labelargs
- Command Arguments- Returns:
- Escaped Command
-
escapeArguments
Escapes some arguments- Parameters:
args
- Command Arguments- Returns:
- Escaped Arguments
-
escapeCommand
public abstract String escapeCommand(String label, String[] args, boolean literal, boolean whitespaced) Escapes a command- Parameters:
label
- Command Labelargs
- Command Argumentsliteral
- Literal String Escape Mode (using Single Quotes)whitespaced
- Whitespaced String Escape Mode (using Double Quotes)- Returns:
- Escaped Command
-
escapeArguments
Escapes some arguments- Parameters:
args
- Command Argumentsliteral
- Literal String Escape Mode (using Single Quotes)whitespaced
- Whitespaced String Escape Mode (using Double Quotes)- Returns:
- Escaped Arguments
-