Class CommandUtils
java.lang.Object
org.strassburger.lifestealz.util.commands.CommandUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetPlayersTabCompletion
(boolean allowStar) Gets a list of player names for tab completiongetPlayersTabCompletion
(boolean allowStar, LifeStealZ plugin) Gets a list of player names for tab completionstatic List
<org.bukkit.entity.Player> parsePlayerName
(String playerName, boolean allowStar) Parses a player name (or a star) to a list of playersstatic List
<org.bukkit.entity.Player> parsePlayerName
(String playerName, boolean allowStar, LifeStealZ plugin) Parses a player name (or a star) to a list of playersstatic void
throwPermissionError
(org.bukkit.command.CommandSender sender) static void
throwUsageError
(org.bukkit.command.CommandSender sender, String usage)
-
Constructor Details
-
CommandUtils
public CommandUtils()
-
-
Method Details
-
parsePlayerName
public static List<org.bukkit.entity.Player> parsePlayerName(String playerName, boolean allowStar, LifeStealZ plugin) Parses a player name (or a star) to a list of players- Parameters:
playerName
- The name of the playerallowStar
- If true, the star will be allowed as a wildcardplugin
- 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 playerallowStar
- If true, the star will be allowed as a wildcard- 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:
allowStar
- If true, the star will be allowed as a wildcardplugin
- 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
-
throwUsageError
-
throwPermissionError
public static void throwPermissionError(org.bukkit.command.CommandSender sender)
-