Class CommandUtils

java.lang.Object
org.strassburger.lifestealz.util.commands.CommandUtils

public class CommandUtils extends Object
  • 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 player
      allowStar - If true, the star will be allowed as a wildcard
      plugin - The plugin instance
      Returns:
      A list of players (or an empty list if the player is not online)
    • parsePlayerName

      public static List<org.bukkit.entity.Player> parsePlayerName(String playerName, boolean allowStar)
      Parses a player name (or a star) to a list of players
      Parameters:
      playerName - The name of the player
      allowStar - 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

      public static List<String> getPlayersTabCompletion(boolean allowStar, LifeStealZ plugin)
      Gets a list of player names for tab completion
      Parameters:
      allowStar - If true, the star will be allowed as a wildcard
      plugin - The plugin instance
      Returns:
      A list of player names
    • getPlayersTabCompletion

      public static List<String> getPlayersTabCompletion(boolean allowStar)
      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

      public static void throwUsageError(org.bukkit.command.CommandSender sender, String usage)
    • throwPermissionError

      public static void throwPermissionError(org.bukkit.command.CommandSender sender)