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)
CreateSender
to use in the library with aCommandSender
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
@NotNull Audience
getAudience()
@NotNull CommandSender
getCommandSender()
GetsCommandSender
.@NotNull String
getName()
Gets the name of the command sender.@NotNull Object
getOriginalSender()
Gets the command sender that the instance is wrapped in.@NotNull UUID
getUUID()
Gets theUUID
of the command sender.int
hashCode()
boolean
hasPermission(@NotNull String perm)
Checks if theSender
has the requested permission.boolean
isConsole()
Checks if the sender is console.boolean
isOnline()
Checks if the sender is online.
-
-
-
Constructor Detail
-
BungeeSender
public BungeeSender(@NotNull @NotNull net.kyori.adventure.platform.bungeecord.BungeeAudiences audiences, @NotNull @NotNull CommandSender sender)
CreateSender
to use in the library with aCommandSender
.- Parameters:
audiences
- theBungeeAudiences
to getAudience
sender
-CommandSender
to wrap
-
-
Method Detail
-
getAudience
@NotNull public @NotNull Audience getAudience()
- Specified by:
getAudience
in interfacecom.github.siroshun09.adventureextender.MessageReceivable
-
getUUID
@NotNull public @NotNull UUID getUUID()
Gets theUUID
of 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 theSender
has the requested permission.- Specified by:
hasPermission
in interfaceSender
- Parameters:
perm
- a permission.- Returns:
true
if the sender have permission,false
otherwise
-
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:
getOriginalSender
in interfaceSender
- Returns:
- the original command sender
-
getCommandSender
@NotNull public @NotNull CommandSender getCommandSender()
GetsCommandSender
.- Returns:
- the wrapped
CommandSender
-
-