Package org.geysermc.geyser.command
Interface CommandSender
- All Known Implementing Classes:
BungeeCommandSender,GeyserSession,GeyserStandaloneLogger,SpigotCommandSender,SpongeCommandSender,VelocityCommandSender
public interface CommandSender
Implemented on top of any class that can send a command.
For example, it wraps around Spigot's CommandSender class.
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturns the locale of the command sender.booleanhasPermission(String permission)Checks if the CommandSender has a permissionbooleanname()voidsendMessage(String message)default voidsendMessage(String[] messages)
-
Method Details
-
name
String name() -
sendMessage
-
sendMessage
-
isConsole
boolean isConsole()- Returns:
- true if the specified sender is from the console.
-
getLocale
Returns the locale of the command sender. Defaults to the default locale atGeyserLocale.getDefaultLocale().- Returns:
- the locale of the command sender.
-
hasPermission
Checks if the CommandSender has a permission- Parameters:
permission- The permission node to check- Returns:
- true if the CommandSender has the requested permission, false if not
-