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 String
Returns the locale of the command sender.boolean
hasPermission(String permission)
Checks if the CommandSender has a permissionboolean
name()
void
sendMessage(String message)
default void
sendMessage(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
-