Class BukkitSender
- java.lang.Object
-
- com.github.siroshun09.mccommand.bukkit.sender.BukkitSender
-
- All Implemented Interfaces:
com.github.siroshun09.adventureextender.MessageReceivable,Sender
public class BukkitSender extends Object implements Sender
A class that wrapsCommandSender.
-
-
Constructor Summary
Constructors Constructor Description BukkitSender(@NotNull net.kyori.adventure.platform.bukkit.BukkitAudiences audiences, @NotNull CommandSender sender)CreateSenderto use in the library with aCommandSender.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)@NotNull AudiencegetAudience()@NotNull CommandSendergetCommandSender()GetsCommandSender.@NotNull StringgetName()Gets the name of the command sender.@NotNull ObjectgetOriginalSender()Gets the command sender that the instance is wrapped in.@NotNull UUIDgetUUID()Gets theUUIDof the command sender.inthashCode()booleanhasPermission(@NotNull String perm)Checks if theSenderhas the requested permission.booleanisOnline()Checks if the sender is online.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
BukkitSender
public BukkitSender(@NotNull @NotNull net.kyori.adventure.platform.bukkit.BukkitAudiences audiences, @NotNull @NotNull CommandSender sender)
CreateSenderto use in the library with aCommandSender.- Parameters:
audiences- theBukkitAudiencesto getAudiencesender-CommandSenderto wrap
-
-
Method Detail
-
getAudience
@NotNull public @NotNull Audience getAudience()
- Specified by:
getAudiencein interfacecom.github.siroshun09.adventureextender.MessageReceivable
-
getUUID
@NotNull public @NotNull UUID getUUID()
Gets theUUIDof the command sender.If it is internal sender, returns
ConsoleSender.CONSOLE_UUID.
-
getName
@NotNull public @NotNull String getName()
Gets the name of the command sender.If it is internal sender, returns
ConsoleSender.CONSOLE_NAME.
-
hasPermission
public boolean hasPermission(@NotNull @NotNull String perm)
Checks if theSenderhas the requested permission.- Specified by:
hasPermissionin interfaceSender- Parameters:
perm- a permission.- Returns:
trueif the sender have permission,falseotherwise
-
isOnline
public boolean isOnline()
Checks if the sender is online.
-
getOriginalSender
@NotNull public @NotNull Object getOriginalSender()
Gets the command sender that the instance is wrapped in.- Specified by:
getOriginalSenderin interfaceSender- Returns:
- the original command sender
-
getCommandSender
@NotNull public @NotNull CommandSender getCommandSender()
GetsCommandSender.- Returns:
- the wrapped
CommandSender
-
-