Class AbstractSender<T>
java.lang.Object
me.lucko.luckperms.common.sender.AbstractSender<T>
- Type Parameters:
T- the command sender type
- All Implemented Interfaces:
Sender
Simple implementation of
Sender using a SenderFactory-
Field Summary
Fields inherited from interface Sender
CONSOLE_NAME, CONSOLE_UUID -
Method Summary
Modifier and TypeMethodDescriptionbooleangetName()Gets the sender's usernamenet.luckperms.api.util.TristategetPermissionValue(String permission) Gets the tristate a permission is set to.Gets the plugin instance the sender is from.Gets the sender's unique id.inthashCode()booleanhasPermission(String permission) Check if the Sender has a permission.booleanhasPermission(CommandPermission permission) Check if the Sender has a permission.booleanGets whether this sender is the consolebooleanisValid()Gets whether this sender is still valid invalid input: '&' receiving messages.voidperformCommand(String commandLine) Makes the sender perform a command.voidsendMessage(net.kyori.adventure.text.Component message) Send a json message to the Sender.static Iterable<net.kyori.adventure.text.Component> splitNewlines(net.kyori.adventure.text.Component message) Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Sender
getNameWithLocation
-
Method Details
-
getPlugin
Description copied from interface:SenderGets the plugin instance the sender is from. -
getUniqueId
Description copied from interface:SenderGets the sender's unique id.See
Sender.CONSOLE_UUIDfor the console's UUID representation.- Specified by:
getUniqueIdin interfaceSender- Returns:
- the sender's uuid
-
getName
-
sendMessage
public void sendMessage(net.kyori.adventure.text.Component message) Description copied from interface:SenderSend a json message to the Sender.- Specified by:
sendMessagein interfaceSender- Parameters:
message- the message to send.
-
getPermissionValue
Description copied from interface:SenderGets the tristate a permission is set to.- Specified by:
getPermissionValuein interfaceSender- Parameters:
permission- the permission to check for- Returns:
- a tristate
-
hasPermission
Description copied from interface:SenderCheck if the Sender has a permission.- Specified by:
hasPermissionin interfaceSender- Parameters:
permission- the permission to check for- Returns:
- true if the sender has the permission
-
hasPermission
Description copied from interface:SenderCheck if the Sender has a permission.- Specified by:
hasPermissionin interfaceSender- Parameters:
permission- the permission to check for- Returns:
- true if the sender has the permission
-
performCommand
Description copied from interface:SenderMakes the sender perform a command.- Specified by:
performCommandin interfaceSender- Parameters:
commandLine- the command
-
isConsole
-
isValid
-
equals
-
hashCode
-
splitNewlines
public static Iterable<net.kyori.adventure.text.Component> splitNewlines(net.kyori.adventure.text.Component message)
-