Package org.geysermc.geyser.api.command
Interface CommandSource
- All Known Subinterfaces:
GeyserConnection
public interface CommandSource
Represents an instance capable of sending commands.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasPermission(String permission) Checks if this command source has the given permissionbooleanIf this source is the console.locale()Returns the locale of the command source.name()The name of the command source.voidsendMessage(@NonNull String message) Sends the given message to the command sourcedefault voidsendMessage(String[] messages) Sends the given messages to the command source
-
Method Details
-
name
String name()The name of the command source.- Returns:
- the name of the command source
-
sendMessage
Sends the given message to the command source- Parameters:
message- the message to send
-
sendMessage
Sends the given messages to the command source- Parameters:
messages- the messages to send
-
isConsole
boolean isConsole()If this source is the console.- Returns:
- true if this source is the console
-
locale
String locale()Returns the locale of the command source.- Returns:
- the locale of the command source.
-
hasPermission
Checks if this command source has the given permission- Parameters:
permission- The permission node to check- Returns:
- true if this command source has a permission
-