Interface CommandSource
- All Superinterfaces:
eu.cloudnetservice.driver.base.Named
public interface CommandSource
extends eu.cloudnetservice.driver.base.Named
The command source represents a message receiving object. All messages regarding command execution and command
parsing are sent to the command source.
The console has its own CommandSource. If you want to use the console CommandSource use the jvm static
console() method.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleancheckPermission(@NonNull String permission) Used to check if the command source has the given permissionstatic @NonNull CommandSourceconsole()voidsendMessage(@NonNull String message) voidsendMessage(@NonNull String... messages) voidsendMessage(@NonNull Collection<String> messages) Methods inherited from interface eu.cloudnetservice.driver.base.Named
name
-
Method Details
-
console
-
sendMessage
- Parameters:
message- the message that is sent to the source- Throws:
NullPointerException- if message is null.
-
sendMessage
- Parameters:
messages- the messages that are sent to the source- Throws:
NullPointerException- if messages is null.
-
sendMessage
- Parameters:
messages- the messages that are sent to the source- Throws:
NullPointerException- if messages is null.
-
checkPermission
Used to check if the command source has the given permission- Parameters:
permission- the permission to check for- Returns:
- whether the source has the permission
- Throws:
NullPointerException- if permission is null.
-