Interface IPlayerClaimInfoAPI
- All Known Subinterfaces:
IClientPlayerClaimInfoAPI
,IServerPlayerClaimInfoAPI
public interface IPlayerClaimInfoAPI
API for claim info of a player
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the number of claims owned by the player.int
Gets the currently configured main color of the player's claims.getClaimsColor
(int subConfigIndex) Gets the currently configured color of the player's sub-claim with a specified index.Gets the currently configured main custom name of the player's claims.getClaimsName
(int subConfigIndex) Gets the currently configured custom name of the player's sub-claim with a specified index.getDimension
(net.minecraft.resources.ResourceLocation id) Gets claim info for a dimension with a specified ID.int
Gets the number of forceloadable claims owned by the player.Gets the UUID of the player.Gets the username of the player.
-
Method Details
-
getClaimCount
int getClaimCount()Gets the number of claims owned by the player.- Returns:
- the claim count
-
getForceloadCount
int getForceloadCount()Gets the number of forceloadable claims owned by the player.- Returns:
- the forceloadable claim count
-
getPlayerId
Gets the UUID of the player.- Returns:
- the UUID of the player, not null
-
getPlayerUsername
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.
- Returns:
- the username of the player, not null
-
getClaimsName
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.
- Returns:
- the main custom name of claimed chunks
-
getClaimsColor
int getClaimsColor()Gets the currently configured main color of the player's claims.Is 0 on the client side before it is synced from the server.
- Returns:
- the main claim color int
-
getClaimsName
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.
- Parameters:
subConfigIndex
- the index of the sub-config used by the sub-claim- Returns:
- the custom name of the sub-claim
-
getClaimsColor
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.
- 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
-
getDimension
@Nullable IPlayerDimensionClaimsAPI getDimension(@Nonnull net.minecraft.resources.ResourceLocation id) Gets claim info for a dimension with a specified ID.- Parameters:
id
- the dimension ID, not null- Returns:
- the claim info of the dimension, null if no claims exist for the specified dimension ID
-