Package ovh.mythmc.social.api.bukkit
Class BukkitSocialUser
java.lang.Object
ovh.mythmc.social.api.user.AbstractSocialUser
ovh.mythmc.social.api.bukkit.BukkitSocialUser
- All Implemented Interfaces:
Audience,ForwardingAudience,ForwardingAudience.Single,Pointered,ChatParticipant,Identified,CompanionClient,OnlinePresence,Reactable,InGameSocialUser,SocialUser,UserPreferences
The
SocialUser implementation for the Bukkit platform.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
ForwardingAudience.Single -
Field Summary
Fields inherited from class ovh.mythmc.social.api.user.AbstractSocialUser
blockedChannelNames, companion, displayName, lastMessageTimestamp, lastPrivateMessageRecipient, mainChannel, rendererClass, socialSpy, username, uuid -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaudience()booleancheckPermission(@NotNull String permission) Checks if thisSocialUserhas a specific permission node.static BukkitSocialUserGets theBukkitSocialUserinstance for a specificUUID.static BukkitSocialUserGets theBukkitSocialUserinstance for a specificPlayer.static BukkitSocialUserfrom(@NotNull SocialUser user) Gets theBukkitSocialUserinstance for a specificSocialUser.booleanisOnline()Determines whether the entity is currently online.Gets theOfflinePlayerinstance of the user.player()Gets the optionalPlayerinstance of the user.<T extends NetworkPayloadWrapper.ServerToClient>
voidsendCustomPayload(@NotNull S2CNetworkChannelWrapper<T> channel, T payload) Sends a custom payload to this user.Methods inherited from class ovh.mythmc.social.api.user.AbstractSocialUser
blockedChannels, companion, displayName, groupChannel, isExpired, lastMessageTimestamp, lastPrivateMessageRecipient, mainChannel, playReaction, rendererClass, socialSpy, username, uuidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
deleteMessage, openBook, removeResourcePacks, removeResourcePacks, removeResourcePacks, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, showTitle, stopSoundMethods inherited from interface ovh.mythmc.social.api.chat.ChatParticipant
blockedChannels, groupChannel, lastPrivateMessageRecipient, mainChannelMethods inherited from interface ovh.mythmc.social.api.network.CompanionClient
companionMethods inherited from interface net.kyori.adventure.audience.ForwardingAudience.Single
audiences, clearResourcePacks, clearTitle, deleteMessage, filterAudience, forEachAudience, get, getOrDefault, getOrDefaultFrom, hideBossBar, openBook, playSound, playSound, playSound, pointers, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendResourcePacks, sendTitlePart, showBossBar, stopSoundMethods inherited from interface ovh.mythmc.social.api.identity.Identified
username, uuidMethods inherited from interface ovh.mythmc.social.api.presence.OnlinePresence
isExpiredMethods inherited from interface ovh.mythmc.social.api.reaction.Reactable
playReactionMethods inherited from interface ovh.mythmc.social.api.user.SocialUser
displayNameOrUsername, rendererClass, sendParsableMessage, sendParsableMessage, sendParsableMessage, sendParsableMessage, sendParsableMessage, sendParsableMessageMethods inherited from interface ovh.mythmc.social.api.user.UserPreferences
displayName, lastMessageTimestamp, socialSpy
-
Constructor Details
-
BukkitSocialUser
-
-
Method Details
-
from
Gets theBukkitSocialUserinstance for a specificPlayer.- Parameters:
player- thePlayerto get theBukkitSocialUserinstance from- Returns:
- the
BukkitSocialUserinstance matching thePlayer
-
from
Gets theBukkitSocialUserinstance for a specificSocialUser.- Parameters:
user- theSocialUserto get theBukkitSocialUserfrom- Returns:
- the
BukkitSocialUserinstance matching theSocialUser
-
from
Gets theBukkitSocialUserinstance for a specificUUID.- Parameters:
uuid- theUUIDto get theBukkitSocialUserfrom- Returns:
- the
BukkitSocialUserinstance matching theUUID
-
checkPermission
Description copied from interface:SocialUserChecks if thisSocialUserhas a specific permission node.- Specified by:
checkPermissionin interfaceSocialUser- Parameters:
permission- the permission node to check- Returns:
trueif the user has the specific permission node,falseotherwise
-
sendCustomPayload
public <T extends NetworkPayloadWrapper.ServerToClient> void sendCustomPayload(@NotNull @NotNull S2CNetworkChannelWrapper<T> channel, @NotNull T payload) Description copied from interface:CompanionClientSends a custom payload to this user.- Specified by:
sendCustomPayloadin interfaceCompanionClient- Type Parameters:
T- theNetworkPayloadWrapper.ServerToClientimplementation to send- Parameters:
channel- theS2CNetworkChannelWrapperwhere the payload should be sentpayload- the payload that should be sent
-
isOnline
public boolean isOnline()Description copied from interface:OnlinePresenceDetermines whether the entity is currently online.- Specified by:
isOnlinein interfaceOnlinePresence- Returns:
trueif the entity is online,falseotherwise
-
audience
- Specified by:
audiencein interfaceForwardingAudience.Single
-
offlinePlayer
Gets theOfflinePlayerinstance of the user.- Returns:
- the
OfflinePlayerinstance of this user
-
player
Gets the optionalPlayerinstance of the user.
-