@Singleton public class ConsoleCommandSender extends Object implements CommandSender
| Constructor and Description |
|---|
ConsoleCommandSender() |
| Modifier and Type | Method and Description |
|---|---|
PermissionAttachment |
addAttachment(PluginContainer plugin) |
PermissionAttachment |
addAttachment(PluginContainer plugin,
String name) |
PermissionAttachment |
addAttachment(PluginContainer plugin,
String name,
Boolean value) |
Map<String,PermissionAttachmentInfo> |
getEffectivePermissions() |
String |
getName()
Returns the name of the command sender.
|
Server |
getServer()
Returns the server instance of the command sender.
|
boolean |
hasPermission(Permission permission) |
boolean |
hasPermission(String name) |
boolean |
isOp()
Checks if this object is a server operator
|
boolean |
isPermissionSet(Permission permission) |
boolean |
isPermissionSet(String name) |
boolean |
isPlayer()
Checks if this command sender is a player.
|
void |
recalculatePermissions() |
void |
removeAttachment(PermissionAttachment attachment) |
void |
sendMessage(String message)
Sends a message to the command sender.
|
void |
sendMessage(TextContainer message)
Sends a message to the command sender.
|
void |
setOp(boolean value)
Sets the operator status of this object
|
public boolean isPermissionSet(String name)
isPermissionSet in interface Permissiblepublic boolean isPermissionSet(Permission permission)
isPermissionSet in interface Permissiblepublic boolean hasPermission(String name)
hasPermission in interface Permissiblepublic boolean hasPermission(Permission permission)
hasPermission in interface Permissiblepublic PermissionAttachment addAttachment(PluginContainer plugin)
addAttachment in interface Permissiblepublic PermissionAttachment addAttachment(PluginContainer plugin, String name)
addAttachment in interface Permissiblepublic PermissionAttachment addAttachment(PluginContainer plugin, String name, Boolean value)
addAttachment in interface Permissiblepublic void removeAttachment(PermissionAttachment attachment)
removeAttachment in interface Permissiblepublic void recalculatePermissions()
recalculatePermissions in interface Permissiblepublic Map<String,PermissionAttachmentInfo> getEffectivePermissions()
getEffectivePermissions in interface Permissiblepublic boolean isPlayer()
CommandSenderisPlayer in interface CommandSenderpublic Server getServer()
CommandSendergetServer in interface CommandSenderpublic void sendMessage(String message)
CommandSendersendMessage in interface CommandSendermessage - The message to sendpublic void sendMessage(TextContainer message)
CommandSendersendMessage in interface CommandSendermessage - The message to send.public String getName()
CommandSendergetName in interface CommandSendergetName()public boolean isOp()
ServerOperatorisOp in interface ServerOperatorpublic void setOp(boolean value)
ServerOperatorsetOp in interface ServerOperatorvalue - true if operator status should be givenCopyright © 2020. All rights reserved.