Interface IClientPlayerClaimInfoAPI
- All Superinterfaces:
IPlayerClaimInfoAPI
API for claim info of a player on the client side
-
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.Stream<Map.Entry<net.minecraft.resources.ResourceLocation,
IPlayerDimensionClaimsAPI>> Gets a stream of all dimension claim info entries for the player.
-
Method Details
-
getClaimCount
int getClaimCount()Description copied from interface:IPlayerClaimInfoAPI
Gets the number of claims owned by the player.- Specified by:
getClaimCount
in interfaceIPlayerClaimInfoAPI
- 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 interfaceIPlayerClaimInfoAPI
- Returns:
- the forceloadable claim count
-
getPlayerId
Description copied from interface:IPlayerClaimInfoAPI
Gets the UUID of the player.- Specified by:
getPlayerId
in interfaceIPlayerClaimInfoAPI
- Returns:
- the UUID of the player, not null
-
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 interfaceIPlayerClaimInfoAPI
- 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 interfaceIPlayerClaimInfoAPI
- 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 interfaceIPlayerClaimInfoAPI
- Returns:
- the main claim color int
-
getClaimsName
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 interfaceIPlayerClaimInfoAPI
- Parameters:
subConfigIndex
- the index of the sub-config used by the sub-claim- Returns:
- the custom name of the sub-claim
-
getClaimsColor
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 interfaceIPlayerClaimInfoAPI
- 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 interfaceIPlayerClaimInfoAPI
- Parameters:
id
- the dimension ID, not null- Returns:
- the claim info of the dimension, null if no claims exist for the specified dimension ID
-