Class BungeeSender
- java.lang.Object
-
- com.github.siroshun09.mccommand.bungee.sender.BungeeSender
-
- All Implemented Interfaces:
com.github.siroshun09.adventureextender.MessageReceivable,Sender
public class BungeeSender extends Object implements Sender
A class that wrapsCommandSender.
-
-
Constructor Summary
Constructors Constructor Description BungeeSender(@NotNull net.kyori.adventure.platform.bungeecord.BungeeAudiences 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.booleanisConsole()Checks if the sender is console.booleanisOnline()Checks if the sender is online.
-
-
-
Constructor Detail
-
BungeeSender
public BungeeSender(@NotNull @NotNull net.kyori.adventure.platform.bungeecord.BungeeAudiences audiences, @NotNull @NotNull CommandSender sender)
CreateSenderto use in the library with aCommandSender.- Parameters:
audiences- theBungeeAudiencesto 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.
-
isConsole
public boolean isConsole()
Checks if the sender is console.
-
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
-
-