public interface MessageCommandSender extends CommandSender
CommandSender.Spigot
Modifier and Type | Method and Description |
---|---|
default @NotNull PermissionAttachment |
addAttachment(@NotNull Plugin plugin)
Adds a new empty
PermissionAttachment to this object |
default @NotNull PermissionAttachment |
addAttachment(@NotNull Plugin plugin,
int ticks)
Temporarily adds a new empty
PermissionAttachment to this
object |
default @NotNull PermissionAttachment |
addAttachment(@NotNull Plugin plugin,
@NotNull String name,
boolean value)
Adds a new
PermissionAttachment with a single permission by
name and value |
default @NotNull PermissionAttachment |
addAttachment(@NotNull Plugin plugin,
@NotNull String name,
boolean value,
int ticks)
Temporarily adds a new
PermissionAttachment with a single
permission by name and value |
default @NotNull Set<PermissionAttachmentInfo> |
getEffectivePermissions()
Gets a set containing all of the permissions currently in effect by
this object
|
default @NotNull String |
getName()
Gets the name of this command sender
|
default @NotNull Server |
getServer()
Returns the server instance that this command is running on
|
default boolean |
hasPermission(@NotNull Permission perm)
Gets the value of the specified permission, if set.
|
default boolean |
hasPermission(@NotNull String name)
Gets the value of the specified permission, if set.
|
default boolean |
isOp()
Checks if this object is a server operator
|
default boolean |
isPermissionSet(@NotNull Permission perm)
Checks if this object contains an override for the specified
Permission |
default boolean |
isPermissionSet(@NotNull String name)
Checks if this object contains an override for the specified
permission, by fully qualified name
|
default void |
recalculatePermissions()
Recalculates the permissions for this object, if the attachments have
changed values.
|
default void |
removeAttachment(@NotNull PermissionAttachment attachment)
Removes the given
PermissionAttachment from this object |
default void |
sendMessage(@NotNull String[] messages)
Sends this sender multiple messages
|
default void |
sendMessage(@Nullable UUID sender,
@NotNull String message)
Sends this sender a message
|
default void |
sendMessage(@Nullable UUID sender,
@NotNull String[] messages)
Sends this sender multiple messages
|
default void |
setOp(boolean value)
Sets the operator status of this object
|
default @NotNull CommandSender.Spigot |
spigot() |
sendMessage, sendMessage, sendMessage, sendMessage
audience, audience, clearTitle, empty, hideBossBar, openBook, openBook, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, showBossBar, showTitle, stopSound, toAudience
default void sendMessage(@NotNull @NotNull String[] messages)
CommandSender
sendMessage
in interface CommandSender
messages
- An array of messages to be displayedAudience.sendMessage(net.kyori.adventure.text.Component)
default void sendMessage(@Nullable @Nullable UUID sender, @NotNull @NotNull String message)
CommandSender
sendMessage
in interface CommandSender
sender
- The sender of this messagemessage
- Message to be displayedAudience.sendMessage(net.kyori.adventure.identity.Identified, net.kyori.adventure.text.Component)
default void sendMessage(@Nullable @Nullable UUID sender, @NotNull @NotNull String[] messages)
CommandSender
sendMessage
in interface CommandSender
sender
- The sender of this messagemessages
- An array of messages to be displayedAudience.sendMessage(net.kyori.adventure.identity.Identified, net.kyori.adventure.text.Component)
@NotNull default @NotNull Server getServer()
CommandSender
getServer
in interface CommandSender
@NotNull default @NotNull String getName()
CommandSender
getName
in interface CommandSender
default boolean isOp()
ServerOperator
isOp
in interface ServerOperator
default void setOp(boolean value)
ServerOperator
setOp
in interface ServerOperator
value
- New operator valuedefault boolean isPermissionSet(@NotNull @NotNull String name)
Permissible
isPermissionSet
in interface Permissible
name
- Name of the permissiondefault boolean isPermissionSet(@NotNull @NotNull Permission perm)
Permissible
Permission
isPermissionSet
in interface Permissible
perm
- Permission to checkdefault boolean hasPermission(@NotNull @NotNull String name)
Permissible
If a permission override is not set on this object, the default value of the permission will be returned.
hasPermission
in interface Permissible
name
- Name of the permissiondefault boolean hasPermission(@NotNull @NotNull Permission perm)
Permissible
If a permission override is not set on this object, the default value of the permission will be returned
hasPermission
in interface Permissible
perm
- Permission to get@NotNull default @NotNull PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name, boolean value)
Permissible
PermissionAttachment
with a single permission by
name and valueaddAttachment
in interface Permissible
plugin
- Plugin responsible for this attachment, may not be null
or disabledname
- Name of the permission to attachvalue
- Value of the permission@NotNull default @NotNull PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin)
Permissible
PermissionAttachment
to this objectaddAttachment
in interface Permissible
plugin
- Plugin responsible for this attachment, may not be null
or disabled@NotNull default @NotNull PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name, boolean value, int ticks)
Permissible
PermissionAttachment
with a single
permission by name and valueaddAttachment
in interface Permissible
plugin
- Plugin responsible for this attachment, may not be null
or disabledname
- Name of the permission to attachvalue
- Value of the permissionticks
- Amount of ticks to automatically remove this attachment
after@NotNull default @NotNull PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, int ticks)
Permissible
PermissionAttachment
to this
objectaddAttachment
in interface Permissible
plugin
- Plugin responsible for this attachment, may not be null
or disabledticks
- Amount of ticks to automatically remove this attachment
afterdefault void removeAttachment(@NotNull @NotNull PermissionAttachment attachment)
Permissible
PermissionAttachment
from this objectremoveAttachment
in interface Permissible
attachment
- Attachment to removedefault void recalculatePermissions()
Permissible
This should very rarely need to be called from a plugin.
recalculatePermissions
in interface Permissible
@NotNull default @NotNull Set<PermissionAttachmentInfo> getEffectivePermissions()
Permissible
getEffectivePermissions
in interface Permissible
@NotNull default @NotNull CommandSender.Spigot spigot()
spigot
in interface CommandSender
Copyright © 2021. All rights reserved.