Package ovh.mythmc.social.api.network
Interface CompanionClient
- All Known Subinterfaces:
InGameSocialUser,SocialUser
- All Known Implementing Classes:
AbstractSocialUser,BukkitSocialUser,ConsoleSocialUser
public interface CompanionClient
-
Method Summary
Modifier and TypeMethodDescriptionGets the optionalSocialUserCompanioninstance of this user.<T extends NetworkPayloadWrapper.ServerToClient>
voidsendCustomPayload(@NotNull S2CNetworkChannelWrapper<T> channel, T payload) Sends a custom payload to this user.
-
Method Details
-
companion
Gets the optionalSocialUserCompanioninstance of this user.- Returns:
- an
Optionalcontaining theSocialUserCompanioninstance of this user, or an emptyOptionalotherwise
-
sendCustomPayload
<T extends NetworkPayloadWrapper.ServerToClient> void sendCustomPayload(@NotNull @NotNull S2CNetworkChannelWrapper<T> channel, @NotNull T payload) Sends a custom payload to this user.- Type Parameters:
T- theNetworkPayloadWrapper.ServerToClientimplementation to send- Parameters:
channel- theS2CNetworkChannelWrapperwhere the payload should be sentpayload- the payload that should be sent
-