Class SpigotCommandSender
java.lang.Object
org.geysermc.geyser.platform.spigot.command.SpigotCommandSender
- All Implemented Interfaces:
CommandSender
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the locale of the command sender.booleanhasPermission(String permission)Checks if the CommandSender has a permissionbooleanname()voidsendMessage(String message)static voidsetUseLegacyLocaleMethod(boolean useLegacyMethod)Set if we are on pre-1.12, and thereforeplayer.getLocale()doesn't exist and we have to getplayer.spigot().getLocale().Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.geyser.command.CommandSender
sendMessage
-
Constructor Details
-
SpigotCommandSender
public SpigotCommandSender(org.bukkit.command.CommandSender handle)
-
-
Method Details
-
name
- Specified by:
namein interfaceCommandSender
-
sendMessage
- Specified by:
sendMessagein interfaceCommandSender
-
isConsole
public boolean isConsole()- Specified by:
isConsolein interfaceCommandSender- Returns:
- true if the specified sender is from the console.
-
getLocale
Description copied from interface:CommandSenderReturns the locale of the command sender. Defaults to the default locale atGeyserLocale.getDefaultLocale().- Specified by:
getLocalein interfaceCommandSender- Returns:
- the locale of the command sender.
-
hasPermission
Description copied from interface:CommandSenderChecks if the CommandSender has a permission- Specified by:
hasPermissionin interfaceCommandSender- 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 thereforeplayer.getLocale()doesn't exist and we have to getplayer.spigot().getLocale().- Parameters:
useLegacyMethod- if we are running pre-1.12 and therefore need to use reflection to get the player locale
-