Package net.md_5.bungee.api
Interface CommandSender
- All Known Subinterfaces:
ConnectedPlayer
,ProxiedPlayer
public interface CommandSender
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds groups to a this user for the current session only.Get all groups this user is part of.getName()
Get the unique name of this command sender.Get all Permissions which this CommandSender hasboolean
hasPermission
(String permission) Checks if this user has the specified permission node.void
removeGroups
(String... groups) Remove groups from this user for the current session only.void
sendMessage
(String message) Deprecated.void
sendMessage
(BaseComponent message) Send a message to this sender.void
sendMessage
(BaseComponent... message) Send a message to this sender.void
sendMessages
(String... messages) Deprecated.void
setPermission
(String permission, boolean value) Set a permission node for this user.
-
Method Details
-
getName
String getName()Get the unique name of this command sender.- Returns:
- the senders username
-
sendMessage
Deprecated.Send a message to this sender.- Parameters:
message
- the message to send
-
sendMessages
Deprecated.Send several messages to this sender. Each message will be sent separately.- Parameters:
messages
- the messages to send
-
sendMessage
Send a message to this sender.- Parameters:
message
- the message to send
-
sendMessage
Send a message to this sender.- Parameters:
message
- the message to send
-
getGroups
Collection<String> getGroups()Get all groups this user is part of. This returns an unmodifiable collection.- Returns:
- the users groups
-
addGroups
Adds groups to a this user for the current session only.- Parameters:
groups
- the groups to add
-
removeGroups
Remove groups from this user for the current session only.- Parameters:
groups
- the groups to remove
-
hasPermission
Checks if this user has the specified permission node.- Parameters:
permission
- the node to check- Returns:
- whether they have this node
-
setPermission
Set a permission node for this user.- Parameters:
permission
- the node to setvalue
- the value of the node
-
getPermissions
Collection<String> getPermissions()Get all Permissions which this CommandSender has- Returns:
- a unmodifiable Collection of Strings which represent their permissions
-