public class RuntimeCommandSender extends Object implements CommandSender
CommandSender
which outputs to a Logger
. This is
specifically made with the intention of unit testing without running a Bukkit
environmentConstructor and Description |
---|
RuntimeCommandSender() |
Modifier and Type | Method and Description |
---|---|
PermissionAttachment |
addAttachment(Plugin plugin) |
PermissionAttachment |
addAttachment(Plugin plugin,
int ticks) |
PermissionAttachment |
addAttachment(Plugin plugin,
String name,
boolean value) |
PermissionAttachment |
addAttachment(Plugin plugin,
String name,
boolean value,
int ticks) |
Set<PermissionAttachmentInfo> |
getEffectivePermissions() |
String |
getName() |
Server |
getServer() |
boolean |
hasPermission(Permission perm) |
boolean |
hasPermission(String name) |
boolean |
isOp() |
boolean |
isPermissionSet(Permission perm) |
boolean |
isPermissionSet(String name) |
void |
recalculatePermissions() |
void |
removeAttachment(PermissionAttachment attachment) |
void |
sendMessage(String message) |
void |
sendMessage(String[] messages) |
void |
setOp(boolean value) |
public void sendMessage(String message)
sendMessage
in interface CommandSender
public void sendMessage(String[] messages)
sendMessage
in interface CommandSender
public Server getServer()
getServer
in interface CommandSender
public String getName()
getName
in interface CommandSender
public boolean isPermissionSet(String name)
isPermissionSet
in interface Permissible
public boolean isPermissionSet(Permission perm)
isPermissionSet
in interface Permissible
public boolean hasPermission(String name)
hasPermission
in interface Permissible
public boolean hasPermission(Permission perm)
hasPermission
in interface Permissible
public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value)
addAttachment
in interface Permissible
public PermissionAttachment addAttachment(Plugin plugin)
addAttachment
in interface Permissible
public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value, int ticks)
addAttachment
in interface Permissible
public PermissionAttachment addAttachment(Plugin plugin, int ticks)
addAttachment
in interface Permissible
public void removeAttachment(PermissionAttachment attachment)
removeAttachment
in interface Permissible
public void recalculatePermissions()
recalculatePermissions
in interface Permissible
public Set<PermissionAttachmentInfo> getEffectivePermissions()
getEffectivePermissions
in interface Permissible
public boolean isOp()
isOp
in interface ServerOperator
public void setOp(boolean value)
setOp
in interface ServerOperator
Copyright © 2017. All rights reserved.