Package ovh.mythmc.social.api.user
Class AbstractSocialUser
java.lang.Object
ovh.mythmc.social.api.user.AbstractSocialUser
- All Implemented Interfaces:
Audience,ForwardingAudience,ForwardingAudience.Single,Pointered,ChatParticipant,Identified,CompanionClient,OnlinePresence,Reactable,SocialUser,UserPreferences
- Direct Known Subclasses:
BukkitSocialUser,ConsoleSocialUser
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
ForwardingAudience.Single -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SocialUserCompanionprotected final Mutable<TextComponent> protected final Mutable<ChatChannel> protected final Class<? extends SocialUser> protected final Stringprotected final UUID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSocialUser(@NotNull UUID uuid, @NotNull String username, @NotNull Class<? extends SocialUser> rendererClass) -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of channel names that this participant has blocked.Gets the optionalSocialUserCompanioninstance of this user.Gets theMutabledisplay name of this user.Gets the group chat channel the participant is currently part of, if any.booleanDetermines whether this entity should be removed from cache.Gets the timestamp of the last message sent by this user.Gets the last participant to whom this user sent a private message.Gets the participant's main chat channel.voidplayReaction(@NotNull Reaction reaction) Plays or triggers the specifiedReaction.Class<? extends SocialUser> Gets theClassthatSocialChatRendererwill use as a reference to render messages.Gets the status of the spy feature for this user.username()Returns the username associated with this identity.uuid()Returns the unique identifier of this object.Methods 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.network.CompanionClient
sendCustomPayloadMethods inherited from interface net.kyori.adventure.audience.ForwardingAudience.Single
audience, 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.presence.OnlinePresence
isOnlineMethods inherited from interface ovh.mythmc.social.api.user.SocialUser
checkPermission, displayNameOrUsername, sendParsableMessage, sendParsableMessage, sendParsableMessage, sendParsableMessage, sendParsableMessage, sendParsableMessage
-
Field Details
-
uuid
-
username
-
rendererClass
-
blockedChannelNames
-
displayName
-
mainChannel
-
lastMessageTimestamp
-
lastPrivateMessageRecipient
-
companion
-
-
Constructor Details
-
AbstractSocialUser
-
-
Method Details
-
mainChannel
Description copied from interface:ChatParticipantGets the participant's main chat channel.This is wrapped in
Mutableso the main channel can be changed dynamically.- Specified by:
mainChannelin interfaceChatParticipant- Returns:
- a
Mutablecontaining the currentChatChannel
-
groupChannel
Description copied from interface:ChatParticipantGets the group chat channel the participant is currently part of, if any.- Specified by:
groupChannelin interfaceChatParticipant- Returns:
- an
Optionalcontaining theGroupChatChannel, or empty if not in a group
-
uuid
Description copied from interface:IdentifiedReturns the unique identifier of this object.- Specified by:
uuidin interfaceIdentified- Returns:
- the
UUIDrepresenting this identity
-
username
Description copied from interface:IdentifiedReturns the username associated with this identity.- Specified by:
usernamein interfaceIdentified- Returns:
- the username
-
displayName
Description copied from interface:UserPreferencesGets theMutabledisplay name of this user.- Specified by:
displayNamein interfaceUserPreferences- Returns:
- a
Mutablecontaining the display name of this user in the form of aTextComponent
-
companion
Description copied from interface:CompanionClientGets the optionalSocialUserCompanioninstance of this user.- Specified by:
companionin interfaceCompanionClient- Returns:
- an
Optionalcontaining theSocialUserCompanioninstance of this user, or an emptyOptionalotherwise
-
isExpired
public boolean isExpired()Description copied from interface:OnlinePresenceDetermines whether this entity should be removed from cache.- Specified by:
isExpiredin interfaceOnlinePresence- Returns:
trueif the entity can be cleared from cache,falseotherwise
-
playReaction
Description copied from interface:ReactablePlays or triggers the specifiedReaction.The exact behavior depends on the implementation and may include visual, auditory, or other interactive effects.
- Specified by:
playReactionin interfaceReactable- Parameters:
reaction- the reaction to play
-
socialSpy
Description copied from interface:UserPreferencesGets the status of the spy feature for this user.- Specified by:
socialSpyin interfaceUserPreferences- Returns:
- a
Mutablecontaining aBoolean
-
lastMessageTimestamp
Description copied from interface:UserPreferencesGets the timestamp of the last message sent by this user.- Specified by:
lastMessageTimestampin interfaceUserPreferences- Returns:
- a
Mutablecontaining the timestamp of the last message sent by this user in the form of aLong
-
lastPrivateMessageRecipient
Description copied from interface:ChatParticipantGets the last participant to whom this user sent a private message.This is wrapped in
Mutableso it can be updated whenever a private message is sent.- Specified by:
lastPrivateMessageRecipientin interfaceChatParticipant- Returns:
- a
Mutablecontaining theUUIDof the last private message recipient
-
blockedChannels
Description copied from interface:ChatParticipantReturns the set of channel names that this participant has blocked.Blocked channels are those whose messages the participant will not receive.
- Specified by:
blockedChannelsin interfaceChatParticipant- Returns:
- an immutable
Setof blocked channel IDs
-
rendererClass
Description copied from interface:SocialUserGets theClassthatSocialChatRendererwill use as a reference to render messages.- Specified by:
rendererClassin interfaceSocialUser- Returns:
- the
Classsubtype ofSocialUserto use as a reference for the renderer
-
socialSpy