Class CommandUtils
java.lang.Object
com.zetaplugins.lifestealz.util.commands.CommandUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDisplayOptions(List<String> options, String input) Gets a list of options that start with the inputgetDisplayOptions(Set<String> options, String input) Gets a list of options that start with the inputgetOfflinePlayersTabCompletion(boolean allowStar, boolean allowPlus, LifeStealZ plugin) getPlayersTabCompletion(boolean allowStar) Gets a list of player names for tab completiongetPlayersTabCompletion(boolean allowPlus, LifeStealZ plugin) Gets a list of player names for tab completionstatic List<OfflinePlayer> parseOfflinePlayer(String playerName, boolean allowStar, boolean allowPlus) static List<OfflinePlayer> parseOfflinePlayer(String playerName, boolean allowStar, boolean allowPlus, LifeStealZ plugin) parsePlayerName(String playerName, boolean allowPlus) Parses a player name (or a star) to a list of playersparsePlayerName(String playerName, boolean allowPlus, LifeStealZ plugin) Parses a player name (or a star) to a list of playersstatic voidthrowPermissionError(CommandSender sender) static voidthrowUsageError(CommandSender sender, String usage)
-
Constructor Details
-
CommandUtils
public CommandUtils()
-
-
Method Details
-
parsePlayerName
Parses a player name (or a star) to a list of players- Parameters:
playerName- The name of the playerallowPlus- If true, the plus will be allowed as a wildcard for all online playersplugin- The plugin instance- Returns:
- A list of players (or an empty list if the player is not online)
-
parsePlayerName
Parses a player name (or a star) to a list of players- Parameters:
playerName- The name of the playerallowPlus- If true, the plus will be allowed as a wildcard for all online players- Returns:
- A list of players (or an empty list if the player is not online)
-
getPlayersTabCompletion
Gets a list of player names for tab completion- Parameters:
allowPlus- If true, the plus will be allowed as a wildcard for all online playersplugin- The plugin instance- Returns:
- A list of player names
-
getPlayersTabCompletion
Gets a list of player names for tab completion- Parameters:
allowStar- If true, the star will be allowed as a wildcard- Returns:
- A list of player names
-
parseOfflinePlayer
public static List<OfflinePlayer> parseOfflinePlayer(String playerName, boolean allowStar, boolean allowPlus, LifeStealZ plugin) -
parseOfflinePlayer
public static List<OfflinePlayer> parseOfflinePlayer(String playerName, boolean allowStar, boolean allowPlus) -
getOfflinePlayersTabCompletion
public static List<String> getOfflinePlayersTabCompletion(boolean allowStar, boolean allowPlus, LifeStealZ plugin) -
throwUsageError
-
throwPermissionError
-
getDisplayOptions
Gets a list of options that start with the input- Parameters:
options- The list of optionsinput- The input- Returns:
- A list of options that start with the input
-
getDisplayOptions
Gets a list of options that start with the input- Parameters:
options- The list of optionsinput- The input- Returns:
- A list of options that start with the input
-