Class SocialAdventureProvider

java.lang.Object
ovh.mythmc.social.api.adventure.SocialAdventureProvider

public abstract class SocialAdventureProvider extends Object
Provides Adventure Audience objects that route messages to social users and the console.

Platform adapters (e.g. Paper) register a concrete implementation on startup via set(SocialAdventureProvider).

  • Constructor Details

    • SocialAdventureProvider

      public SocialAdventureProvider()
  • Method Details

    • set

      public static void set(@NotNull @NotNull SocialAdventureProvider s)
      Registers the active adventure provider.
      Parameters:
      s - the provider to register
    • get

      Returns the active adventure provider.
      Returns:
      the adventure provider
    • user

      public abstract Audience user(@NotNull @NotNull SocialUser user)
      Returns the audience that wraps the given user.
      Parameters:
      user - the social user
      Returns:
      the corresponding audience
    • console

      public abstract Audience console()
      Returns the audience that wraps the server console.
      Returns:
      the console audience