Interface WhitelistService
-
public interface WhitelistService
Represents the service for managing a whitelist ofGameProfile
s.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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<Boolean>
addProfile(GameProfile profile)
Adds the specifiedGameProfile
to this whitelist.CompletableFuture<Boolean>
isWhitelisted(GameProfile profile)
Gets whether the specifiedGameProfile
is present on this whitelist.CompletableFuture<Boolean>
removeProfile(GameProfile profile)
Removes the specifiedGameProfile
from this whitelist, if present.CompletableFuture<Collection<GameProfile>>
whitelistedProfiles()
Gets the collection ofGameProfile
s present on this whitelist.
-
-
-
Method Detail
-
whitelistedProfiles
CompletableFuture<Collection<GameProfile>> whitelistedProfiles()
Gets the collection ofGameProfile
s present on this whitelist.- Returns:
- The
GameProfile
s present on this whitelist
-
isWhitelisted
CompletableFuture<Boolean> isWhitelisted(GameProfile profile)
Gets whether the specifiedGameProfile
is present on this whitelist.- Parameters:
profile
- The game profile to check for- Returns:
- Whether the specified
GameProfile
is present on this whitelist
-
addProfile
CompletableFuture<Boolean> addProfile(GameProfile profile)
Adds the specifiedGameProfile
to this whitelist.- Parameters:
profile
- The game profile to add- Returns:
- Whether the specified
GameProfile
was already present on this whitelist
-
removeProfile
CompletableFuture<Boolean> removeProfile(GameProfile profile)
Removes the specifiedGameProfile
from this whitelist, if present.- Parameters:
profile
- The game profile to remove- Returns:
- Whether the specified
GameProfile
was present before removal
-
-