Interface IServerPlayerClaimInfoAPI

All Superinterfaces:
IPlayerClaimInfoAPI

public interface IServerPlayerClaimInfoAPI extends IPlayerClaimInfoAPI
API for claim info of a player on the server side
  • Method Details

    • getClaimCount

      int getClaimCount()
      Description copied from interface: IPlayerClaimInfoAPI
      Gets the number of claims owned by the player.
      Specified by:
      getClaimCount in interface IPlayerClaimInfoAPI
      Returns:
      the claim count
    • getForceloadCount

      int getForceloadCount()
      Description copied from interface: IPlayerClaimInfoAPI
      Gets the number of forceloadable claims owned by the player.
      Specified by:
      getForceloadCount in interface IPlayerClaimInfoAPI
      Returns:
      the forceloadable claim count
    • getPlayerId

      @Nonnull UUID getPlayerId()
      Description copied from interface: IPlayerClaimInfoAPI
      Gets the UUID of the player.
      Specified by:
      getPlayerId in interface IPlayerClaimInfoAPI
      Returns:
      the UUID of the player, not null
    • getPlayerUsername

      @Nonnull String getPlayerUsername()
      Description copied from interface: IPlayerClaimInfoAPI
      Gets the username of the player.

      Can just be the UUID in string form until the player logs in and it's updated to the actual current username, or before it is synced to the client.

      Specified by:
      getPlayerUsername in interface IPlayerClaimInfoAPI
      Returns:
      the username of the player, not null
    • getClaimsName

      String getClaimsName()
      Description copied from interface: IPlayerClaimInfoAPI
      Gets the currently configured main custom name of the player's claims.

      Can be empty if a custom name is not configured or null if the name hasn't been synced to the client yet.

      Specified by:
      getClaimsName in interface IPlayerClaimInfoAPI
      Returns:
      the main custom name of claimed chunks
    • getClaimsColor

      int getClaimsColor()
      Description copied from interface: IPlayerClaimInfoAPI
      Gets the currently configured main color of the player's claims.

      Is 0 on the client side before it is synced from the server.

      Specified by:
      getClaimsColor in interface IPlayerClaimInfoAPI
      Returns:
      the main claim color int
    • getClaimsName

      @Nullable String getClaimsName(int subConfigIndex)
      Description copied from interface: IPlayerClaimInfoAPI
      Gets the currently configured custom name of the player's sub-claim with a specified index.

      Returns null if no such sub-claim exists or the name is inherited from the main config.

      Specified by:
      getClaimsName in interface IPlayerClaimInfoAPI
      Parameters:
      subConfigIndex - the index of the sub-config used by the sub-claim
      Returns:
      the custom name of the sub-claim
    • getClaimsColor

      @Nullable Integer getClaimsColor(int subConfigIndex)
      Description copied from interface: IPlayerClaimInfoAPI
      Gets the currently configured color of the player's sub-claim with a specified index.

      Returns null if no such sub-claim exists or the color is inherited from the main config.

      Specified by:
      getClaimsColor in interface IPlayerClaimInfoAPI
      Parameters:
      subConfigIndex - the index of the sub-config used by the sub-claim
      Returns:
      the sub-claim color Integer, null if no such sub-claim exists
    • getStream

      @Nonnull Stream<Map.Entry<net.minecraft.resources.ResourceLocation,IPlayerDimensionClaimsAPI>> getStream()
      Gets a stream of all dimension claim info entries for the player.
      Returns:
      the stream of all dimension claim info entries, not null
    • getDimension

      @Nullable IPlayerDimensionClaimsAPI getDimension(@Nonnull net.minecraft.resources.ResourceLocation id)
      Description copied from interface: IPlayerClaimInfoAPI
      Gets claim info for a dimension with a specified ID.
      Specified by:
      getDimension in interface IPlayerClaimInfoAPI
      Parameters:
      id - the dimension ID, not null
      Returns:
      the claim info of the dimension, null if no claims exist for the specified dimension ID
    • getClaimsName

      @Nullable String getClaimsName(@Nonnull String subId)
      Gets the currently configured custom name of the player's sub-claim with a specified string ID.

      Returns null if no such sub-claim exists or the name is inherited from the main config.

      Parameters:
      subId - the string ID of the sub-config used by the sub-claim, not null
      Returns:
      the custom name of the sub-claim
    • getClaimsColor

      @Nullable Integer getClaimsColor(@Nonnull String subId)
      Gets the currently configured color of the player's sub-claim with a specified string ID.

      Returns null if no such sub-claim exists or the color is inherited from the main config.

      Parameters:
      subId - the string ID of the sub-config used by the sub-claim, not null
      Returns:
      the sub-claim color Integer, null if no such sub-claim exists
    • resyncPartyName

      void resyncPartyName(@Nonnull IPlayerPartySystemAPI<?> partySystem)
      Resyncs the name of the party that owns the claims stored in this player claim info, which is displayed when the mod is in party-owned-claims mode. The party that owns the claims is the party owned by this player.

      If the specified party system argument is not the primary system, then nothing will happen, as only the primary party system is used in party-owned-claims mode. So if a party is renamed in any of the party systems, then this method can be safely called, whether it's the primary system or not.

      Calling this method is optional because the mod automatically detects party name changes every second, if at least one party member is online. This method can be used to speed it up or to update the name for parties that don't have anyone online. The default built-in party system does so.

      Parameters:
      partySystem - the party system in which the party owned by this player was renamed and might require resync, not null
    • resyncPartyName

      @Deprecated default void resyncPartyName(@Nonnull IPlayerPartySystemAPI<?> partySystem)
      Deprecated.
      Use resyncPartyName(IPlayerPartySystemAPI) instead.

      Resyncs the name of the party that owns the claims stored in this player claim info, which is displayed when the mod is in party-owned-claims mode. The party that owns the claims is the party owned by this player.

      If the specified party system argument is not the primary system, then nothing will happen, as only the primary party system is used in party-owned-claims mode. So if a party is renamed in any of the party systems, then this method can be safely called, whether it's the primary system or not.

      Calling this method is optional because the mod automatically detects party name changes every second, if at least one party member is online. This method can be used to speed it up or to update the name for parties that don't have anyone online. The default built-in party system does so.

      Parameters:
      partySystem - the party system in which the party owned by this player was renamed and might require resync, not null