Class ServerPlayerDataAPI

java.lang.Object
xaero.pac.common.server.player.data.api.ServerPlayerDataAPI

public abstract class ServerPlayerDataAPI extends Object
API for data attached to a server player
  • 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 public abstract boolean isClaimsServerMode()
      Deprecated.
      Use getClaimingMode() instead

      Checks if the player is using the server claim mode.

      Returns:
      true if the player is in the server claim mode, otherwise false
    • getClaimingMode

      @Nonnull public abstract IClaimingModeAPI getClaimingMode()
      Gets the current effective claiming mode.

      All claiming modes can be accessed through ClaimingModes

      Returns:
      the current claiming mode, not null
    • getRawClaimingMode

      @Nullable public abstract IClaimingModeAPI 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