Class ServerPlayerDataAPI
java.lang.Object
xaero.pac.common.server.player.data.api.ServerPlayerDataAPI
API for data attached to a server player
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerPlayerDataAPIfrom(net.minecraft.server.level.ServerPlayer player) Gets the player data for a specified logged in player.abstract IClaimingModeAPIGets the current effective claiming mode.abstract IClaimingModeAPIGets the current claiming mode without automatically determining the effective one if none is set.abstract booleanChecks if the player is using the claims admin mode.abstract booleanChecks if the player is using the claims non-ally mode.abstract booleanDeprecated.abstract booleanChecks if this player is using the parties admin mode.
-
Constructor Details
-
ServerPlayerDataAPI
public ServerPlayerDataAPI()
-
-
Method Details
-
isClaimsAdminMode
public abstract boolean isClaimsAdminMode()Checks if the player is using the claims admin mode.- Returns:
- true if the player is in the claims admin mode, otherwise false
-
isClaimsNonallyMode
public abstract boolean isClaimsNonallyMode()Checks if the player is using the claims non-ally mode.- Returns:
- true if the player is in the claims non-ally mode, otherwise false
-
isClaimsServerMode
Deprecated.UsegetClaimingMode()insteadChecks if the player is using the server claim mode.
- Returns:
- true if the player is in the server claim mode, otherwise false
-
getClaimingMode
Gets the current effective claiming mode.All claiming modes can be accessed through
ClaimingModes- Returns:
- the current claiming mode, not null
-
getRawClaimingMode
Gets the current claiming mode without automatically determining the effective one if none is set.All claiming modes can be accessed through
ClaimingModes- Returns:
- the current claiming mode, null if none is set
-
isPartiesAdminMode
public abstract boolean isPartiesAdminMode()Checks if this player is using the parties admin mode.- Returns:
- true if the player is in parties admin mode, otherwise false
-
from
@Nonnull public static ServerPlayerDataAPI from(@Nonnull net.minecraft.server.level.ServerPlayer player) Gets the player data for a specified logged in player.- Parameters:
player- the player, not null- Returns:
- the parties and claims player data for the player, not null
-
getClaimingMode()instead