Interface IServerPlayerClaimInfoAPI
- All Superinterfaces:
IPlayerClaimInfoAPI
API for claim info of a player on the server side
-
Method Summary
Modifier and TypeMethodDescriptionintGets the number of claims owned by the player.intGets 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.getClaimsColor(String subId) Gets the currently configured color of the player's sub-claim with a specified string ID.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.getClaimsName(String subId) Gets the currently configured custom name of the player's sub-claim with a specified string ID.getDimension(net.minecraft.resources.ResourceLocation id) Gets claim info for a dimension with a specified ID.intGets 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:IPlayerClaimInfoAPIGets the number of claims owned by the player.- Specified by:
getClaimCountin interfaceIPlayerClaimInfoAPI- Returns:
- the claim count
-
getForceloadCount
int getForceloadCount()Description copied from interface:IPlayerClaimInfoAPIGets the number of forceloadable claims owned by the player.- Specified by:
getForceloadCountin interfaceIPlayerClaimInfoAPI- Returns:
- the forceloadable claim count
-
getPlayerId
Description copied from interface:IPlayerClaimInfoAPIGets the UUID of the player.- Specified by:
getPlayerIdin interfaceIPlayerClaimInfoAPI- Returns:
- the UUID of the player, not null
-
getPlayerUsername
Description copied from interface:IPlayerClaimInfoAPIGets 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:
getPlayerUsernamein interfaceIPlayerClaimInfoAPI- Returns:
- the username of the player, not null
-
getClaimsName
String getClaimsName()Description copied from interface:IPlayerClaimInfoAPIGets 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:
getClaimsNamein interfaceIPlayerClaimInfoAPI- Returns:
- the main custom name of claimed chunks
-
getClaimsColor
int getClaimsColor()Description copied from interface:IPlayerClaimInfoAPIGets 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:
getClaimsColorin interfaceIPlayerClaimInfoAPI- Returns:
- the main claim color int
-
getClaimsName
Description copied from interface:IPlayerClaimInfoAPIGets 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:
getClaimsNamein 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:IPlayerClaimInfoAPIGets 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:
getClaimsColorin 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:IPlayerClaimInfoAPIGets claim info for a dimension with a specified ID.- Specified by:
getDimensionin 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
-
getClaimsName
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
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
-