Package ovh.mythmc.social.api.user
Interface SocialUser
- All Superinterfaces:
Audience,ChatParticipant,CompanionClient,ForwardingAudience,ForwardingAudience.Single,Identified,OnlinePresence,Pointered,Reactable,UserPreferences
- All Known Subinterfaces:
InGameSocialUser
- All Known Implementing Classes:
AbstractSocialUser,BukkitSocialUser,ConsoleSocialUser
public interface SocialUser
extends ChatParticipant, Identified, CompanionClient, OnlinePresence, Reactable, UserPreferences, ForwardingAudience.Single
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
ForwardingAudience.Single -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckPermission(@NotNull String permission) Checks if thisSocialUserhas a specific permission node.default @NotNull TextComponentGets the display name of thisSocialUserif present, or its username otherwise.Class<? extends SocialUser> Gets theClassthatSocialChatRendererwill use as a reference to render messages.default voidsendParsableMessage(@NotNull String message) Parses and sends a given message to thisSocialUser.default voidsendParsableMessage(@NotNull String message, boolean playerInput) Parses and sends a given message to thisSocialUser.default voidsendParsableMessage(@NotNull Component component) Parses and sends a given message to thisSocialUser.default voidsendParsableMessage(@NotNull Component component, boolean playerInput) Parses and sends a given message to thisSocialUser.default voidParses and sends a given message to thisSocialUser.default voidsendParsableMessage(@NotNull SocialParserContext context, boolean playerInput) Parses and sends a given message to thisSocialUser.Methods 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
companion, 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.identity.Identified
username, uuidMethods inherited from interface ovh.mythmc.social.api.presence.OnlinePresence
isExpired, isOnlineMethods inherited from interface ovh.mythmc.social.api.reaction.Reactable
playReactionMethods inherited from interface ovh.mythmc.social.api.user.UserPreferences
displayName, lastMessageTimestamp, socialSpy
-
Method Details
-
rendererClass
Class<? extends SocialUser> rendererClass()Gets theClassthatSocialChatRendererwill use as a reference to render messages.- Returns:
- the
Classsubtype ofSocialUserto use as a reference for the renderer
-
checkPermission
Checks if thisSocialUserhas a specific permission node.- Parameters:
permission- the permission node to check- Returns:
trueif the user has the specific permission node,falseotherwise
-
sendParsableMessage
default void sendParsableMessage(@NotNull @NotNull SocialParserContext context, boolean playerInput) Parses and sends a given message to thisSocialUser.- Parameters:
context- theSocialParserContextto parseplayerInput- whether the text processor should use the player input mode
-
sendParsableMessage
Parses and sends a given message to thisSocialUser.- Parameters:
context- theSocialParserContextto parse
-
sendParsableMessage
Parses and sends a given message to thisSocialUser.This method builds a
SocialParserContextwith the providedComponent.- Parameters:
component- theComponentto parseplayerInput- whether the text processor should use the player input mode
-
sendParsableMessage
Parses and sends a given message to thisSocialUser.This method builds a
SocialParserContextwith the providedComponent.- Parameters:
component- theComponentto parse
-
sendParsableMessage
Parses and sends a given message to thisSocialUser.This method builds a
SocialParserContextwith the providedStringwrapped in aComponent.- Parameters:
message- the message to parseplayerInput- whether the text processor should use the player input mode
-
sendParsableMessage
Parses and sends a given message to thisSocialUser.This method builds a
SocialParserContextwith the providedStringwrapped in aComponent.- Parameters:
message- the message to parse
-
displayNameOrUsername
Gets the display name of thisSocialUserif present, or its username otherwise.- Returns:
- a
TextComponentwith the display name of this user if present or its username otherwise
-