Package net.md_5.bungee.api
Interface CommandSender
-
- All Known Subinterfaces:
ConnectedPlayer,ProxiedPlayer
public interface CommandSender
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddGroups(String... groups)Adds groups to a this user for the current session only.Collection<String>getGroups()Get all groups this user is part of.StringgetName()Get the unique name of this command sender.Collection<String>getPermissions()Get all Permissions which this CommandSender hasbooleanhasPermission(String permission)Checks if this user has the specified permission node.voidremoveGroups(String... groups)Remove groups from this user for the current session only.voidsendMessage(String message)Deprecated.voidsendMessage(BaseComponent message)Send a message to this sender.voidsendMessage(BaseComponent... message)Send a message to this sender.voidsendMessages(String... messages)Deprecated.voidsetPermission(String permission, boolean value)Set a permission node for this user.
-
-
-
Method Detail
-
getName
String getName()
Get the unique name of this command sender.- Returns:
- the senders username
-
sendMessage
@Deprecated void sendMessage(String message)
Deprecated.Send a message to this sender.- Parameters:
message- the message to send
-
sendMessages
@Deprecated void sendMessages(String... messages)
Deprecated.Send several messages to this sender. Each message will be sent separately.- Parameters:
messages- the messages to send
-
sendMessage
void sendMessage(BaseComponent... message)
Send a message to this sender.- Parameters:
message- the message to send
-
sendMessage
void sendMessage(BaseComponent message)
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
void addGroups(String... groups)
Adds groups to a this user for the current session only.- Parameters:
groups- the groups to add
-
removeGroups
void removeGroups(String... groups)
Remove groups from this user for the current session only.- Parameters:
groups- the groups to remove
-
hasPermission
boolean hasPermission(String permission)
Checks if this user has the specified permission node.- Parameters:
permission- the node to check- Returns:
- whether they have this node
-
setPermission
void setPermission(String permission, boolean value)
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
-
-