Interface WhitelistService


  • public interface WhitelistService
    Represents the service for managing a whitelist of GameProfiles.

    In Vanilla, the service is controlled by Server.isWhitelistEnabled(). Additionally, operators are always allowed to join, regardless of their absence or presence on the whitelist service.

    • Method Detail

      • whitelistedProfiles

        java.util.concurrent.CompletableFuture<java.util.Collection<GameProfile>> whitelistedProfiles()
        Gets the collection of GameProfiles present on this whitelist.
        Returns:
        The GameProfiles present on this whitelist
      • isWhitelisted

        java.util.concurrent.CompletableFuture<java.lang.Boolean> isWhitelisted​(GameProfile profile)
        Gets whether the specified GameProfile is present on this whitelist.
        Parameters:
        profile - The game profile to check for
        Returns:
        Whether the specified GameProfile is present on this whitelist
      • addProfile

        java.util.concurrent.CompletableFuture<java.lang.Boolean> addProfile​(GameProfile profile)
        Adds the specified GameProfile to this whitelist.
        Parameters:
        profile - The game profile to add
        Returns:
        Whether the specified GameProfile was already present on this whitelist
      • removeProfile

        java.util.concurrent.CompletableFuture<java.lang.Boolean> removeProfile​(GameProfile profile)
        Removes the specified GameProfile from this whitelist, if present.
        Parameters:
        profile - The game profile to remove
        Returns:
        Whether the specified GameProfile was present before removal