Class SpigotCommandSender

java.lang.Object
org.geysermc.geyser.platform.spigot.command.SpigotCommandSender
All Implemented Interfaces:
CommandSender

public class SpigotCommandSender extends Object implements CommandSender
  • Constructor Details

    • SpigotCommandSender

      public SpigotCommandSender(org.bukkit.command.CommandSender handle)
  • Method Details

    • name

      public String name()
      Specified by:
      name in interface CommandSender
    • sendMessage

      public void sendMessage(String message)
      Specified by:
      sendMessage in interface CommandSender
    • isConsole

      public boolean isConsole()
      Specified by:
      isConsole in interface CommandSender
      Returns:
      true if the specified sender is from the console.
    • getLocale

      public String getLocale()
      Description copied from interface: CommandSender
      Returns the locale of the command sender. Defaults to the default locale at GeyserLocale.getDefaultLocale().
      Specified by:
      getLocale in interface CommandSender
      Returns:
      the locale of the command sender.
    • hasPermission

      public boolean hasPermission(String permission)
      Description copied from interface: CommandSender
      Checks if the CommandSender has a permission
      Specified by:
      hasPermission in interface CommandSender
      Parameters:
      permission - The permission node to check
      Returns:
      true if the CommandSender has the requested permission, false if not
    • setUseLegacyLocaleMethod

      public static void setUseLegacyLocaleMethod(boolean useLegacyMethod)
      Set if we are on pre-1.12, and therefore player.getLocale() doesn't exist and we have to get player.spigot().getLocale().
      Parameters:
      useLegacyMethod - if we are running pre-1.12 and therefore need to use reflection to get the player locale