Interface IServerClaimsManagerAPI
- All Superinterfaces:
IClaimsManagerAPI
Special claim owners can be found at SpecialClaimOwners, such as for server claims.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAnchor(net.minecraft.resources.ResourceLocation dimension, net.minecraft.world.level.ChunkPos pos, UUID playerId) Adds a claiming anchor in a specified dimension, at a specified chunk position, for a specified player, if it doesn't already exist there.claim(net.minecraft.resources.ResourceLocation dimension, UUID id, int subConfigIndex, int x, int z, boolean forceload) Directly replaces the current claim state of a chunk.get(net.minecraft.resources.ResourceLocation dimension, int x, int z) Gets the claim state for a specified chunk.get(net.minecraft.resources.ResourceLocation dimension, net.minecraft.core.BlockPos blockPos) Gets the claim state for a specified chunk.get(net.minecraft.resources.ResourceLocation dimension, net.minecraft.world.level.ChunkPos chunkPos) Gets the claim state for a specified chunk.Gets the API for the claim action listener manager for this claims manager where you can register claim action listeners.Gets the API for the chunk access overrider manager for this claims manager where you can register your chunk access overriders.intgetColor(IPlayerChunkClaimAPI claimState, net.minecraft.resources.ResourceLocation dimension) Gets the color that would be used for a provided claim state and dimension.net.minecraft.network.chat.ComponentgetDefaultName(UUID claimId, boolean forceloadable) Gets the default display name that would be used for a provided claim UUID.net.minecraft.network.chat.ComponentgetDefaultName(UUID claimId, boolean forceloadable, boolean allowPartyNames) Gets the default display name that would be used for a provided claim UUID.net.minecraft.network.chat.ComponentgetDefaultName(IPlayerChunkClaimAPI claimState) Gets the default display name that would be used for a provided claim state.net.minecraft.network.chat.ComponentgetDefaultName(IPlayerChunkClaimAPI claimState, boolean allowPartyNames) Gets the default display name that would be used for a provided claim state.getDimension(net.minecraft.resources.ResourceLocation dimension) Gets the read-only claims manager for a specified dimension ID.Gets a stream of all read-only dimension claims managers.net.minecraft.network.chat.ComponentgetFullName(IPlayerChunkClaimAPI claimState) Gets the full display name, with sub-claim names applied, that would be used for a provided claim state.net.minecraft.network.chat.ComponentgetFullName(IPlayerChunkClaimAPI claimState, boolean allowPartyNames) Gets the full display name, with sub-claim names applied, that would be used for a provided claim state.net.minecraft.network.chat.ComponentgetFullName(IPlayerChunkClaimAPI claimState, net.minecraft.resources.ResourceLocation dimension, boolean allowPartyNames) Gets the full display name, with sub-claim names applied, that would be used for a provided claim state and dimension.intgetPlayerBaseAnchorLimit(UUID playerId) Gets the base maximum claiming anchor number (without the bonus) for a player UUID.intgetPlayerBaseAnchorLimit(net.minecraft.server.level.ServerPlayer player) Gets the base maximum claiming anchor number (without the bonus) for a logged in player.intgetPlayerBaseAnchorRange(UUID playerId) Gets the base claiming anchor range (without the bonus) for a player UUID.intgetPlayerBaseAnchorRange(net.minecraft.server.level.ServerPlayer player) Gets the base claiming anchor range (without the bonus) for a logged in player.intgetPlayerBaseClaimLimit(UUID playerId) Gets the base maximum claim number (without the bonus) for a player UUID.intgetPlayerBaseClaimLimit(net.minecraft.server.level.ServerPlayer player) Gets the base maximum claim number (without the bonus) for a logged in player.intgetPlayerBaseForceloadLimit(UUID playerId) Gets the base maximum forceload number (without the bonus) for a player UUID.intgetPlayerBaseForceloadLimit(net.minecraft.server.level.ServerPlayer player) Gets the base maximum forceload number (without the bonus) for a logged in player.intgetPlayerFullAnchorLimit(UUID playerId, net.minecraft.resources.ResourceLocation dimension) Gets the full maximum claiming anchor number (with the bonus) for a player UUID and dimension.intgetPlayerFullAnchorLimit(net.minecraft.server.level.ServerPlayer player, net.minecraft.resources.ResourceLocation dimension) Gets the full maximum claiming anchor number (with the bonus) for a logged in player and dimension.intgetPlayerFullAnchorRange(UUID playerId, net.minecraft.resources.ResourceLocation dimension) Gets the full claiming anchor range (with the bonus) for a player UUID and dimension.intgetPlayerFullAnchorRange(net.minecraft.server.level.ServerPlayer player, net.minecraft.resources.ResourceLocation dimension) Gets the full claiming anchor range (with the bonus) for a logged in player and dimension.intgetPlayerFullClaimLimit(UUID playerId) Gets the full maximum claim number (with the bonus) for a player UUID.intgetPlayerFullClaimLimit(net.minecraft.server.level.ServerPlayer player) Gets the full maximum claim number (with the bonus) for a logged in player.intgetPlayerFullForceloadLimit(UUID playerId) Gets the full maximum forceload number (with the bonus) for a player UUID.intgetPlayerFullForceloadLimit(net.minecraft.server.level.ServerPlayer player) Gets the full maximum forceload number (with the bonus) for a logged in player.getPlayerInfo(UUID playerId) Gets or creates the claim info instance for a player UUID.Gets a stream of all player claim info.Gets the claim change tracker that lets you register claim change listeners.booleanhasPlayerInfo(UUID playerId) Checks whether a player has claim info.booleanisClaimable(net.minecraft.resources.ResourceLocation dimension) Checks whether a dimension is claimable.booleanremoveAnchor(net.minecraft.resources.ResourceLocation dimension, net.minecraft.world.level.ChunkPos pos, UUID playerId) Removes the claiming anchor in a specified dimension, at a specified chunk position, for a specified player, if it exists.tryToAddAnchor(net.minecraft.resources.ResourceLocation dimension, UUID playerId, net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int x, int z, boolean force) Tries to add a claiming anchor for a chunk by a specified player.default ClaimResult<IPlayerChunkClaimAPI>tryToClaim(net.minecraft.resources.ResourceLocation dimension, UUID playerId, int subConfigIndex, int fromX, int fromZ, int x, int z, boolean replace) Deprecated.tryToClaim(net.minecraft.resources.ResourceLocation dimension, UUID playerId, int subConfigIndex, net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int x, int z, boolean force) Tries to claim a chunk by a specified player.default AreaClaimResulttryToClaimArea(net.minecraft.resources.ResourceLocation dimension, UUID playerId, int subConfigIndex, int fromX, int fromZ, int left, int top, int right, int bottom, boolean replace) Deprecated.UsetryToClaimArea(ResourceLocation, UUID, int, ResourceLocation, int, int, int, int, int, int, boolean, Consumer)instead Tries to claim chunks over a specified area by a specified player.voidtryToClaimArea(net.minecraft.resources.ResourceLocation dimension, UUID playerId, int subConfigIndex, net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int left, int top, int right, int bottom, boolean force, Consumer<AreaClaimResult> listener) Tries to claim chunks over a specified area as a specified player.default ClaimResult<IPlayerChunkClaimAPI>tryToForceload(net.minecraft.resources.ResourceLocation dimension, UUID playerId, int fromX, int fromZ, int x, int z, boolean enable, boolean replace) Deprecated.UsetryToForceload(ResourceLocation, UUID, ResourceLocation, int, int, int, int, boolean, boolean)instead Tries to (un)mark a chunk for forceloading by a specified player.tryToForceload(net.minecraft.resources.ResourceLocation dimension, UUID playerId, net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int x, int z, boolean enable, boolean force) Tries to (un)mark a chunk for forceloading by a specified player.default AreaClaimResulttryToForceloadArea(net.minecraft.resources.ResourceLocation dimension, UUID playerId, int fromX, int fromZ, int left, int top, int right, int bottom, boolean enable, boolean replace) Deprecated.UsetryToForceloadArea(ResourceLocation, UUID, ResourceLocation, int, int, int, int, int, int, boolean, boolean, Consumer)instead Tries to (un)mark chunks for forceloading over a specified area by a specified player.voidtryToForceloadArea(net.minecraft.resources.ResourceLocation dimension, UUID playerId, net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int left, int top, int right, int bottom, boolean enable, boolean force, Consumer<AreaClaimResult> listener) Tries to (un)mark chunks for forceloading over a specified area by a specified player.tryToRemoveAnchor(net.minecraft.resources.ResourceLocation dimension, UUID playerId, net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int x, int z, boolean force, Consumer<AreaClaimResult> listener) Tries to remove a claiming anchor for a chunk by a specified player.default ClaimResult<IPlayerChunkClaimAPI>tryToUnclaim(net.minecraft.resources.ResourceLocation dimension, UUID playerId, int fromX, int fromZ, int x, int z, boolean replace) Deprecated.UsetryToUnclaim(ResourceLocation, UUID, ResourceLocation, int, int, int, int, boolean)instead Tries to unclaim a chunk by a specified player.tryToUnclaim(net.minecraft.resources.ResourceLocation dimension, UUID playerId, net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int x, int z, boolean force) Tries to unclaim a chunk by a specified player.default AreaClaimResulttryToUnclaimArea(net.minecraft.resources.ResourceLocation dimension, UUID playerId, int fromX, int fromZ, int left, int top, int right, int bottom, boolean replace) Deprecated.UsetryToUnclaimArea(ResourceLocation, UUID, ResourceLocation, int, int, int, int, int, int, boolean, Consumer)instead Tries to unclaim chunks over a specified area by a specified player.voidtryToUnclaimArea(net.minecraft.resources.ResourceLocation dimension, UUID playerId, net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int left, int top, int right, int bottom, boolean force, Consumer<AreaClaimResult> listener) Tries to unclaim chunks over a specified area by a specified player.voidunclaim(net.minecraft.resources.ResourceLocation dimension, int x, int z) Directly removes the current claim state of a chunk.booleanChecks whether anchor-based claiming is used.Methods inherited from interface xaero.pac.common.claims.api.IClaimsManagerAPI
getCustomName
-
Method Details
-
hasPlayerInfo
Description copied from interface:IClaimsManagerAPIChecks whether a player has claim info.- Specified by:
hasPlayerInfoin interfaceIClaimsManagerAPI- Parameters:
playerId- UUID of the player, not null- Returns:
- true if the player with UUID
playerIdhas claims info, otherwise false
-
getPlayerInfo
Description copied from interface:IClaimsManagerAPIGets or creates the claim info instance for a player UUID.- Specified by:
getPlayerInfoin interfaceIClaimsManagerAPI- Parameters:
playerId- UUID of a player, not null- Returns:
- the player claim info, not null
-
getPlayerInfoStream
Gets a stream of all player claim info.- Returns:
- a
Streamof all player claim info
-
get
@Nullable IPlayerChunkClaimAPI get(@Nonnull net.minecraft.resources.ResourceLocation dimension, int x, int z) Description copied from interface:IClaimsManagerAPIGets the claim state for a specified chunk.- Specified by:
getin interfaceIClaimsManagerAPI- Parameters:
dimension- the dimension ID of the chunk, not nullx- the X coordinate of the chunkz- the Z coordinate of the chunk- Returns:
- the current claim state at the specified location, null if wilderness
-
get
@Nullable IPlayerChunkClaimAPI get(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull net.minecraft.world.level.ChunkPos chunkPos) Description copied from interface:IClaimsManagerAPIGets the claim state for a specified chunk.- Specified by:
getin interfaceIClaimsManagerAPI- Parameters:
dimension- the dimension ID of the chunk, not nullchunkPos- the coordinates of the chunk, not null- Returns:
- the current claim state at the specified location, null if wilderness
-
get
@Nullable IPlayerChunkClaimAPI get(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull net.minecraft.core.BlockPos blockPos) Description copied from interface:IClaimsManagerAPIGets the claim state for a specified chunk.- Specified by:
getin interfaceIClaimsManagerAPI- Parameters:
dimension- the dimension ID of the chunk, not nullblockPos- the block coordinates of the chunk, not null- Returns:
- the current claim state at the specified location, null if wilderness
-
getDimension
@Nullable IServerDimensionClaimsManagerAPI getDimension(@Nonnull net.minecraft.resources.ResourceLocation dimension) Description copied from interface:IClaimsManagerAPIGets the read-only claims manager for a specified dimension ID.- Specified by:
getDimensionin interfaceIClaimsManagerAPI- Parameters:
dimension- the dimension ID, not null- Returns:
- the dimension claims manager, null if no claim data exists for the specified dimension
-
getDimensionStream
Gets a stream of all read-only dimension claims managers.- Returns:
- a
Streamof all read-only dimension claims managers
-
getTracker
Description copied from interface:IClaimsManagerAPIGets the claim change tracker that lets you register claim change listeners.The tracker notifies the registered listeners when claim changes occur.
- Specified by:
getTrackerin interfaceIClaimsManagerAPI- Returns:
- the claim change tracker
-
getDefaultName
@Nonnull net.minecraft.network.chat.Component getDefaultName(@Nullable IPlayerChunkClaimAPI claimState) Description copied from interface:IClaimsManagerAPIGets the default display name that would be used for a provided claim state.Calling this method is the equivalent of calling
IClaimsManagerAPI.getDefaultName(IPlayerChunkClaimAPI, boolean)with allowPartyNames as true.- Specified by:
getDefaultNamein interfaceIClaimsManagerAPI- Parameters:
claimState- the claim state, can be null for wilderness- Returns:
- the default display name, not null
-
getDefaultName
@Nonnull net.minecraft.network.chat.Component getDefaultName(@Nullable IPlayerChunkClaimAPI claimState, boolean allowPartyNames) Description copied from interface:IClaimsManagerAPIGets the default display name that would be used for a provided claim state.With this method you can specify whether you want party names applied to party-owned claims or to always use player names.
- Specified by:
getDefaultNamein interfaceIClaimsManagerAPI- Parameters:
claimState- the claim state, can be null for wildernessallowPartyNames- whether to apply party names to party-owned claims- Returns:
- the default display name, not null
-
getDefaultName
@Nonnull net.minecraft.network.chat.Component getDefaultName(@Nullable UUID claimId, boolean forceloadable) Description copied from interface:IClaimsManagerAPIGets the default display name that would be used for a provided claim UUID.Calling this method is the equivalent of calling
IClaimsManagerAPI.getDefaultName(UUID, boolean, boolean)with allowPartyNames as true.- Specified by:
getDefaultNamein interfaceIClaimsManagerAPI- Parameters:
claimId- the UUID of the claimer owner, null for wildernessforceloadable- whether to get the default name for a forceloaded claim- Returns:
- the default display name, not null
-
getDefaultName
@Nonnull net.minecraft.network.chat.Component getDefaultName(@Nullable UUID claimId, boolean forceloadable, boolean allowPartyNames) Description copied from interface:IClaimsManagerAPIGets the default display name that would be used for a provided claim UUID.With this method you can specify whether you want party names applied to party-owned claims or to always use player names.
- Specified by:
getDefaultNamein interfaceIClaimsManagerAPI- Parameters:
claimId- the UUID of the claimer owner, null for wildernessforceloadable- whether to get the default name for a forceloaded claimallowPartyNames- whether to apply party names to party-owned claims- Returns:
- the default display name, not null
-
getFullName
@Nonnull net.minecraft.network.chat.Component getFullName(@Nullable IPlayerChunkClaimAPI claimState) Description copied from interface:IClaimsManagerAPIGets the full display name, with sub-claim names applied, that would be used for a provided claim state.Calling this method is the equivalent of calling
IClaimsManagerAPI.getFullName(IPlayerChunkClaimAPI, boolean)with allowPartyNames as true.- Specified by:
getFullNamein interfaceIClaimsManagerAPI- Parameters:
claimState- the claim state, can be null for wilderness- Returns:
- the full display name, not null
-
getFullName
@Nonnull net.minecraft.network.chat.Component getFullName(@Nullable IPlayerChunkClaimAPI claimState, boolean allowPartyNames) Description copied from interface:IClaimsManagerAPIGets the full display name, with sub-claim names applied, that would be used for a provided claim state.With this method you can specify whether you want party names applied to party-owned claims or to always use player names.
This method does not apply dimension-specific names to wilderness or expired claims. Use
IClaimsManagerAPI.getFullName(IPlayerChunkClaimAPI, ResourceLocation, boolean)instead for that.- Specified by:
getFullNamein interfaceIClaimsManagerAPI- Parameters:
claimState- the claim state, can be null for wildernessallowPartyNames- whether to apply party names to party-owned claims- Returns:
- the full display name, not null
-
getFullName
@Nonnull net.minecraft.network.chat.Component getFullName(@Nullable IPlayerChunkClaimAPI claimState, @Nullable net.minecraft.resources.ResourceLocation dimension, boolean allowPartyNames) Description copied from interface:IClaimsManagerAPIGets the full display name, with sub-claim names applied, that would be used for a provided claim state and dimension.The dimension argument only matters when claimState is null (wilderness) or an expired claim.
With this method you can specify whether you want party names applied to party-owned claims or to always use player names.
- Specified by:
getFullNamein interfaceIClaimsManagerAPI- Parameters:
claimState- the claim state, can be null for wildernessdimension- the dimension the claim is in, null when doesn't matterallowPartyNames- whether to apply party names to party-owned claims- Returns:
- the full display name, not null
-
getColor
int getColor(@Nullable IPlayerChunkClaimAPI claimState, @Nullable net.minecraft.resources.ResourceLocation dimension) Description copied from interface:IClaimsManagerAPIGets the color that would be used for a provided claim state and dimension.The dimension argument only matters when claimState is null (wilderness) or an expired claim.
The returned value on the client side is the default color (0 for actual players) before the color is synced from the server. The returned color may also not correspond to the dimension before the dimension-specific color is synced.
- Specified by:
getColorin interfaceIClaimsManagerAPI- Parameters:
claimState- the claim state, can be null for wildernessdimension- the dimension the claim is in, null when doesn't matter- Returns:
- the color of the claim state
-
usingAnchorBasedClaiming
boolean usingAnchorBasedClaiming()Description copied from interface:IClaimsManagerAPIChecks whether anchor-based claiming is used.The returned value is false on the client side before the real one is synced from the server.
- Specified by:
usingAnchorBasedClaimingin interfaceIClaimsManagerAPI- Returns:
- true if anchor-based claiming is enabled on the server, otherwise false
-
isClaimable
boolean isClaimable(@Nonnull net.minecraft.resources.ResourceLocation dimension) Checks whether a dimension is claimable.Claimable dimensions are determined by the server config.
- Parameters:
dimension- the dimension ID- Returns:
- whether the dimension is claimable
-
claim
@Nullable IPlayerChunkClaimAPI claim(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID id, int subConfigIndex, int x, int z, boolean forceload) Directly replaces the current claim state of a chunk.It is usually a bad idea to give regular players unfiltered access to this method. Use
tryToClaim(ResourceLocation, UUID, int, ResourceLocation, int, int, int, int, boolean)ortryToForceload(ResourceLocation, UUID, ResourceLocation, int, int, int, int, boolean, boolean)instead if you want different limitations to be considered, e.g. maximum claim distance, maximum claim number, the chunk being already claimed etc.Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to claim as them.- Parameters:
dimension- the dimension ID of the chunk, not nullid- the claim owner UUID, not nullsubConfigIndex- the sub-config index to be used by the claimx- the X coordinate of the chunkz- the Z coordinate of the chunkforceload- whether the chunk should be marked for forceloading- Returns:
- the new claim state, null if claims are disabled
-
unclaim
void unclaim(@Nonnull net.minecraft.resources.ResourceLocation dimension, int x, int z) Directly removes the current claim state of a chunk.It is usually a bad idea to give regular players unfiltered access to this method. Use
tryToUnclaim(ResourceLocation, UUID, ResourceLocation, int, int, int, int, boolean)instead if you want different limitations to be considered, e.g. maximum claim distance, the chunk being claimed by a different player etc.- Parameters:
dimension- the dimension ID of the chunk, not nullx- the X coordinate of the chunkz- the Z coordinate of the chunk
-
addAnchor
boolean addAnchor(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull net.minecraft.world.level.ChunkPos pos, @Nonnull UUID playerId) Adds a claiming anchor in a specified dimension, at a specified chunk position, for a specified player, if it doesn't already exist there.- Parameters:
dimension- the dimension ID for the anchor, not nullpos- the position for the anchor, not nullplayerId- the ID of the player to add the anchor for, not null- Returns:
- true if the anchor was added, false if the specified position already had an anchor
-
removeAnchor
boolean removeAnchor(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull net.minecraft.world.level.ChunkPos pos, @Nonnull UUID playerId) Removes the claiming anchor in a specified dimension, at a specified chunk position, for a specified player, if it exists.- Parameters:
dimension- the dimension ID of the anchor, not nullpos- the position of the anchor, not nullplayerId- the ID of the player to remove the anchor for, not null- Returns:
- true if the anchor was removed, false if the specified position didn't have one
-
tryToClaim
@Deprecated @Nonnull default ClaimResult<IPlayerChunkClaimAPI> tryToClaim(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, int subConfigIndex, int fromX, int fromZ, int x, int z, boolean replace) Deprecated.UsetryToClaim(ResourceLocation, UUID, int, ResourceLocation, int, int, int, int, boolean)instead Tries to claim a chunk by a specified player.Success is not guaranteed. Different limitations are checked, e.g. maximum claim number, maximum claim distance, existing claims.
Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to claim as them.You get a
ClaimResultcontaining a claim state where relevant (the new one if it's a success) and a message describing the result.- Parameters:
dimension- the dimension ID of the chunk, not nullplayerId- the claiming player's UUID, not nullsubConfigIndex- the sub-config index to be used by the claimfromX- the X coordinate of the claiming player's current chunk positionfromZ- the Z coordinate of the claiming player's current chunk positionx- the X coordinate of the chunk to claimz- the Z coordinate of the chunk to claimreplace- whether to ignore some limitations, mainly the existing claim state at the specified location and the maximum claim distance- Returns:
- the result, not null
-
tryToUnclaim
@Deprecated @Nonnull default ClaimResult<IPlayerChunkClaimAPI> tryToUnclaim(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, int fromX, int fromZ, int x, int z, boolean replace) Deprecated.UsetryToUnclaim(ResourceLocation, UUID, ResourceLocation, int, int, int, int, boolean)instead Tries to unclaim a chunk by a specified player.Success is not guaranteed. Different limitations are checked, e.g. maximum claim distance, existing claims.
Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to unclaim as them.You get a
ClaimResultcontaining a claim state where relevant (null if it's a success) and a message describing the result.- Parameters:
dimension- the dimension ID of the chunk, not nullplayerId- the unclaiming player's UUID, not nullfromX- the X coordinate of the unclaiming player's current chunk positionfromZ- the Z coordinate of the unclaiming player's current chunk positionx- the X coordinate of the chunk to unclaimz- the Z coordinate of the chunk to unclaimreplace- whether to ignore some limitations, mainly the existing claim owner at the specified location and the maximum claim distance- Returns:
- the result, not null
-
tryToForceload
@Deprecated @Nonnull default ClaimResult<IPlayerChunkClaimAPI> tryToForceload(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, int fromX, int fromZ, int x, int z, boolean enable, boolean replace) Deprecated.UsetryToForceload(ResourceLocation, UUID, ResourceLocation, int, int, int, int, boolean, boolean)instead Tries to (un)mark a chunk for forceloading by a specified player.Success is not guaranteed. Different limitations are checked, e.g. maximum forceload number, maximum claim distance, existing claims.
Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to (un)forceload as them.You get a
ClaimResultcontaining a claim state where relevant (the new one if it's a success) and a message describing the result.- Parameters:
dimension- the dimension ID of the chunk, not nullplayerId- the forceloading player's UUID, not nullfromX- the X coordinate of the forceloading player's current chunk positionfromZ- the Z coordinate of the forceloading player's current chunk positionx- the X coordinate of the chunk to (un)mark for forceloadingz- the Z coordinate of the chunk to (un)mark for forceloadingenable- true to mark for forceloading, false to unmarkreplace- whether to ignore some limitations, mainly the existing claim owner at the specified location and the maximum claim distance- Returns:
- the result, not null
-
tryToClaimArea
@Deprecated @Nonnull default AreaClaimResult tryToClaimArea(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, int subConfigIndex, int fromX, int fromZ, int left, int top, int right, int bottom, boolean replace) Deprecated.UsetryToClaimArea(ResourceLocation, UUID, int, ResourceLocation, int, int, int, int, int, int, boolean, Consumer)instead Tries to claim chunks over a specified area by a specified player.Success is not guaranteed. Different limitations are checked, e.g. maximum claim number, maximum claim distance, existing claims.
Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to claim as them.You get a
AreaClaimResultcontaining all unique result types, which contain messages describing the results.- Parameters:
dimension- the dimension ID of the chunks, not nullplayerId- the claiming player's UUID, not nullsubConfigIndex- the sub-config index to be used by the claimsfromX- the X coordinate of the claiming player's current chunk positionfromZ- the Z coordinate of the claiming player's current chunk positionleft- the lowest X coordinate of the areatop- the lowest Z coordinate of the arearight- the highest X coordinate of the areabottom- the highest Z coordinate of the areareplace- whether to ignore some limitations, mainly the existing claim owner at the specified location and the maximum claim distance- Returns:
- the area result, not null
-
tryToUnclaimArea
@Deprecated @Nonnull default AreaClaimResult tryToUnclaimArea(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, int fromX, int fromZ, int left, int top, int right, int bottom, boolean replace) Deprecated.UsetryToUnclaimArea(ResourceLocation, UUID, ResourceLocation, int, int, int, int, int, int, boolean, Consumer)instead Tries to unclaim chunks over a specified area by a specified player.Success is not guaranteed. Different limitations are checked, e.g. maximum claim distance, existing claims.
Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to unclaim as them.You get a
AreaClaimResultcontaining all unique result types, which contain messages describing the results.- Parameters:
dimension- the dimension ID of the chunks, not nullplayerId- the unclaiming player's UUID, not nullfromX- the X coordinate of the unclaiming player's current chunk positionfromZ- the Z coordinate of the unclaiming player's current chunk positionleft- the lowest X coordinate of the areatop- the lowest Z coordinate of the arearight- the highest X coordinate of the areabottom- the highest Z coordinate of the areareplace- whether to ignore some limitations, mainly the existing claim owner at the specified location and the maximum claim distance- Returns:
- the area result, not null
-
tryToForceloadArea
@Deprecated @Nonnull default AreaClaimResult tryToForceloadArea(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, int fromX, int fromZ, int left, int top, int right, int bottom, boolean enable, boolean replace) Deprecated.UsetryToForceloadArea(ResourceLocation, UUID, ResourceLocation, int, int, int, int, int, int, boolean, boolean, Consumer)instead Tries to (un)mark chunks for forceloading over a specified area by a specified player.Success is not guaranteed. Different limitations are checked, e.g. maximum forceload number, maximum claim distance, existing claims.
Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to (un)forceload as them.You get a
AreaClaimResultcontaining all unique result types, which contain messages describing the results.- Parameters:
dimension- the dimension ID of the chunks, not nullplayerId- the forceloading player's UUID, not nullfromX- the X coordinate of the forceloading player's current chunk positionfromZ- the Z coordinate of the forceloading player's current chunk positionleft- the lowest X coordinate of the areatop- the lowest Z coordinate of the arearight- the highest X coordinate of the areabottom- the highest Z coordinate of the areaenable- true to mark for forceloading, false to unmarkreplace- whether to ignore some limitations, mainly the existing claim owner at the specified location and the maximum claim distance- Returns:
- the area result, not null
-
tryToClaim
@Nonnull ClaimResult<IPlayerChunkClaimAPI> tryToClaim(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, int subConfigIndex, @Nonnull net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int x, int z, boolean force) Tries to claim a chunk by a specified player.Success is not guaranteed. Different limitations are checked, e.g. maximum claim number, maximum claim distance, existing claims.
Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to claim as them.You get a
ClaimResultcontaining a claim state where relevant (the new one if it's a success) and a message describing the result.- Parameters:
dimension- the dimension ID of the chunk, not nullplayerId- the claiming player's UUID, not nullsubConfigIndex- the sub-config index to be used by the claimfromDimension- the ID of the dimension the claiming player is currently in, not nullfromX- the X coordinate of the claiming player's current chunk positionfromZ- the Z coordinate of the claiming player's current chunk positionx- the X coordinate of the chunk to claimz- the Z coordinate of the chunk to claimforce- whether to ignore most limitations- Returns:
- the result, not null
-
tryToUnclaim
@Nonnull ClaimResult<IPlayerChunkClaimAPI> tryToUnclaim(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, @Nonnull net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int x, int z, boolean force) Tries to unclaim a chunk by a specified player.Success is not guaranteed. Different limitations are checked, e.g. maximum claim distance, existing claims.
Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to unclaim as them.You get a
ClaimResultcontaining a claim state where relevant (null if it's a success) and a message describing the result.- Parameters:
dimension- the dimension ID of the chunk, not nullplayerId- the unclaiming player's UUID, not nullfromDimension- the ID of the dimension the unclaiming player is currently in, not nullfromX- the X coordinate of the unclaiming player's current chunk positionfromZ- the Z coordinate of the unclaiming player's current chunk positionx- the X coordinate of the chunk to unclaimz- the Z coordinate of the chunk to unclaimforce- whether to ignore most limitations- Returns:
- the result, not null
-
tryToForceload
@Nonnull ClaimResult<IPlayerChunkClaimAPI> tryToForceload(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, @Nonnull net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int x, int z, boolean enable, boolean force) Tries to (un)mark a chunk for forceloading by a specified player.Success is not guaranteed. Different limitations are checked, e.g. maximum forceload number, maximum claim distance, existing claims.
Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to (un)forceload as them.You get a
ClaimResultcontaining a claim state where relevant (the new one if it's a success) and a message describing the result.- Parameters:
dimension- the dimension ID of the chunk, not nullplayerId- the forceloading player's UUID, not nullfromDimension- the ID of the dimension the forceloading player is currently in, not nullfromX- the X coordinate of the forceloading player's current chunk positionfromZ- the Z coordinate of the forceloading player's current chunk positionx- the X coordinate of the chunk to (un)mark for forceloadingz- the Z coordinate of the chunk to (un)mark for forceloadingenable- true to mark for forceloading, false to unmarkforce- whether to ignore most limitations- Returns:
- the result, not null
-
tryToAddAnchor
@Nonnull ClaimResult<IPlayerChunkClaimAPI> tryToAddAnchor(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, @Nonnull net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int x, int z, boolean force) Tries to add a claiming anchor for a chunk by a specified player.Success is not guaranteed. Different limitations are checked, e.g. maximum anchor number, maximum claim distance, existing anchors.
You get a
ClaimResultcontaining a message describing the result.- Parameters:
dimension- the dimension ID of the chunk, not nullplayerId- the anchoring player's UUID, not nullfromDimension- the ID of the dimension the anchoring player is currently in, not nullfromX- the X coordinate of the anchoring player's current chunk positionfromZ- the Z coordinate of the anchoring player's current chunk positionx- the X coordinate of the chunk to add the anchor forz- the Z coordinate of the chunk to add the anchor forforce- whether to ignore most limitations- Returns:
- the result, not null
-
tryToRemoveAnchor
@Nonnull ClaimResult<IPlayerChunkClaimAPI> tryToRemoveAnchor(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, @Nonnull net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int x, int z, boolean force, @Nullable Consumer<AreaClaimResult> listener) Tries to remove a claiming anchor for a chunk by a specified player.Success is not guaranteed. Different limitations are checked, e.g. maximum anchor number, maximum claim distance, existing anchors.
You get a
ClaimResultcontaining a message describing the initial result of trying to begin the removal process.- Parameters:
dimension- the dimension ID of the chunk, not nullplayerId- the unanchoring player's UUID, not nullfromDimension- the ID of the dimension the unanchoring player is currently in, not nullfromX- the X coordinate of the unanchoring player's current chunk positionfromZ- the Z coordinate of the unanchoring player's current chunk positionx- the X coordinate of the chunk to remove the anchor forz- the Z coordinate of the chunk to remove the anchor forforce- whether to ignore most limitationslistener- listener for the final result, can be null- Returns:
- the initial result of trying to begin the removal process, not null
-
tryToClaimArea
void tryToClaimArea(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, int subConfigIndex, @Nonnull net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int left, int top, int right, int bottom, boolean force, @Nonnull Consumer<AreaClaimResult> listener) Tries to claim chunks over a specified area as a specified player.The effect of calling this method is not immediate, and it may take many server ticks before the result is passed to a provided listener.
Success is not guaranteed. Different limitations are checked, e.g. maximum claim number, maximum claim distance, existing claims.
Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to claim as them.When the claiming process is complete, an
AreaClaimResultis passed to the provided listener containing all unique result types, which contain messages describing the results.- Parameters:
dimension- the dimension ID of the chunks to claim, not nullplayerId- the claiming player's UUID, not nullsubConfigIndex- the sub-config index to be used by the claimsfromDimension- the ID of the dimension the claiming player is currently in, not nullfromX- the X coordinate of the claiming player's current chunk positionfromZ- the Z coordinate of the claiming player's current chunk positionleft- the lowest X coordinate of the areatop- the lowest Z coordinate of the arearight- the highest X coordinate of the areabottom- the highest Z coordinate of the areaforce- whether to ignore most limitationslistener- the claiming result listener, not null
-
tryToUnclaimArea
void tryToUnclaimArea(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, @Nonnull net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int left, int top, int right, int bottom, boolean force, @Nonnull Consumer<AreaClaimResult> listener) Tries to unclaim chunks over a specified area by a specified player.The effect of calling this method is not immediate, and it may take many server ticks before the result is passed to a provided listener.
Success is not guaranteed. Different limitations are checked, e.g. maximum claim distance, existing claims.
Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to unclaim as them.When the unclaiming process is complete, an
AreaClaimResultis passed to the provided listener containing all unique result types, which contain messages describing the results.- Parameters:
dimension- the dimension ID of the chunks to unclaim, not nullplayerId- the unclaiming player's UUID, not nullfromDimension- the ID of the dimension the unclaiming player is currently in, not nullfromX- the X coordinate of the unclaiming player's current chunk positionfromZ- the Z coordinate of the unclaiming player's current chunk positionleft- the lowest X coordinate of the areatop- the lowest Z coordinate of the arearight- the highest X coordinate of the areabottom- the highest Z coordinate of the areaforce- whether to ignore most limitationslistener- the claiming result listener, not null
-
tryToForceloadArea
void tryToForceloadArea(@Nonnull net.minecraft.resources.ResourceLocation dimension, @Nonnull UUID playerId, @Nonnull net.minecraft.resources.ResourceLocation fromDimension, int fromX, int fromZ, int left, int top, int right, int bottom, boolean enable, boolean force, @Nonnull Consumer<AreaClaimResult> listener) Tries to (un)mark chunks for forceloading over a specified area by a specified player.The effect of calling this method is not immediate, and it may take many server ticks before the result is passed to a provided listener.
Success is not guaranteed. Different limitations are checked, e.g. maximum forceload number, maximum claim distance, existing claims.
Special claim owners can be found at
SpecialClaimOwners, such as for server claims, in case you wish to (un)forceload as them.When the forceload (un)marking process is complete, an
AreaClaimResultis passed to the provided listener containing all unique result types, which contain messages describing the results.- Parameters:
dimension- the dimension ID of the chunks to forceload, not nullplayerId- the forceloading player's UUID, not nullfromDimension- the ID of the dimension the forceloading player is currently in, not nullfromX- the X coordinate of the forceloading player's current chunk positionfromZ- the Z coordinate of the forceloading player's current chunk positionleft- the lowest X coordinate of the areatop- the lowest Z coordinate of the arearight- the highest X coordinate of the areabottom- the highest Z coordinate of the areaenable- true to mark for forceloading, false to unmarkforce- whether to ignore most limitationslistener- the claiming result listener, not null
-
getPlayerBaseClaimLimit
Gets the base maximum claim number (without the bonus) for a player UUID.By default, the base claim limit is configured in this mod's server config file. However, if a supported permission mod is installed, a permission node is configured in the claim mod's server config and the player with UUID
playerIdis logged in, then the permission value is used as the base limit.- Parameters:
playerId- the player UUID, not null- Returns:
- the base maximum claim number
-
getPlayerBaseClaimLimit
int getPlayerBaseClaimLimit(@Nonnull net.minecraft.server.level.ServerPlayer player) Gets the base maximum claim number (without the bonus) for a logged in player.By default, the base claim limit is configured in this mod's server config file. However, if a supported permission mod is installed and a permission node is configured in the claim mod's server config, then the permission value is used as the base limit.
- Parameters:
player- the player, not null- Returns:
- the base maximum claim number
-
getPlayerBaseForceloadLimit
Gets the base maximum forceload number (without the bonus) for a player UUID.By default, the base forceload limit is configured in this mod's server config file. However, if a supported permission mod is installed, a permission node is configured in the claim mod's server config and the player with UUID
playerIdis logged in, then the permission value is used as the base limit.- Parameters:
playerId- the player UUID, not null- Returns:
- the base maximum forceload number
-
getPlayerBaseForceloadLimit
int getPlayerBaseForceloadLimit(@Nonnull net.minecraft.server.level.ServerPlayer player) Gets the base maximum forceload number (without the bonus) for a logged in player.By default, the base forceload limit is configured in this mod's server config file. However, if a supported permission mod is installed and a permission node is configured in the claim mod's server config, then the permission value is used as the base limit.
- Parameters:
player- the player, not null- Returns:
- the base maximum forceload number
-
getPlayerBaseAnchorLimit
Gets the base maximum claiming anchor number (without the bonus) for a player UUID.By default, the base claiming anchor limit is configured in this mod's server config file. However, if a supported permission mod is installed, a permission node is configured in the claim mod's server config and the player with UUID
playerIdis logged in, then the permission value is used as the base limit.- Parameters:
playerId- the player UUID, not null- Returns:
- the base maximum claiming anchor number
-
getPlayerBaseAnchorLimit
int getPlayerBaseAnchorLimit(@Nonnull net.minecraft.server.level.ServerPlayer player) Gets the base maximum claiming anchor number (without the bonus) for a logged in player.By default, the base claiming anchor limit is configured in this mod's server config file. However, if a supported permission mod is installed and a permission node is configured in the claim mod's server config, then the permission value is used as the base limit.
- Parameters:
player- the player, not null- Returns:
- the base maximum claiming anchor number
-
getPlayerBaseAnchorRange
Gets the base claiming anchor range (without the bonus) for a player UUID.By default, the base claiming anchor range is configured in this mod's server config file. However, if a supported permission mod is installed, a permission node is configured in the claim mod's server config and the player with UUID
playerIdis logged in, then the permission value is used as the base limit.- Parameters:
playerId- the player UUID, not null- Returns:
- the base claiming anchor range
-
getPlayerBaseAnchorRange
int getPlayerBaseAnchorRange(@Nonnull net.minecraft.server.level.ServerPlayer player) Gets the base claiming anchor range (without the bonus) for a logged in player.By default, the base claiming anchor range is configured in this mod's server config file. However, if a supported permission mod is installed and a permission node is configured in the claim mod's server config, then the permission value is used as the base limit.
- Parameters:
player- the player, not null- Returns:
- the base claiming anchor range
-
getPlayerFullClaimLimit
Gets the full maximum claim number (with the bonus) for a player UUID.The returned value is equal to the value returned by
getPlayerBaseClaimLimit(UUID)with the bonus claims added to it.- Parameters:
playerId- the player UUID, not null- Returns:
- the full maximum claim number
-
getPlayerFullClaimLimit
int getPlayerFullClaimLimit(@Nonnull net.minecraft.server.level.ServerPlayer player) Gets the full maximum claim number (with the bonus) for a logged in player.The returned value is equal to the value returned by
getPlayerBaseClaimLimit(ServerPlayer)with the bonus claims added to it.- Parameters:
player- the player, not null- Returns:
- the full maximum claim number
-
getPlayerFullForceloadLimit
Gets the full maximum forceload number (with the bonus) for a player UUID.The returned value is equal to the value returned by
getPlayerBaseForceloadLimit(UUID)with the bonus forceloads added to it.- Parameters:
playerId- the player UUID, not null- Returns:
- the full maximum forceload number
-
getPlayerFullForceloadLimit
int getPlayerFullForceloadLimit(@Nonnull net.minecraft.server.level.ServerPlayer player) Gets the full maximum forceload number (with the bonus) for a logged in player.The returned value is equal to the value returned by
getPlayerBaseForceloadLimit(ServerPlayer)with the bonus forceloads added to it.- Parameters:
player- the player, not null- Returns:
- the full maximum forceload number
-
getPlayerFullAnchorLimit
int getPlayerFullAnchorLimit(@Nonnull UUID playerId, @Nonnull net.minecraft.resources.ResourceLocation dimension) Gets the full maximum claiming anchor number (with the bonus) for a player UUID and dimension.The returned value is equal to the value returned by
getPlayerBaseAnchorLimit(UUID)with the bonus claiming anchors added to it, which includes the player's own config bonus and the wilderness config bonus.- Parameters:
playerId- the player UUID, not nulldimension- the dimension ID to get the limit for, not null- Returns:
- the full maximum claiming anchor number
-
getPlayerFullAnchorLimit
int getPlayerFullAnchorLimit(@Nonnull net.minecraft.server.level.ServerPlayer player, @Nonnull net.minecraft.resources.ResourceLocation dimension) Gets the full maximum claiming anchor number (with the bonus) for a logged in player and dimension.The returned value is equal to the value returned by
getPlayerBaseAnchorLimit(ServerPlayer)with the bonus claiming anchors added to it, which includes the player's own config bonus and the wilderness config bonus.- Parameters:
player- the player, not nulldimension- the dimension ID to get the limit for, not null- Returns:
- the full maximum claiming anchor number
-
getPlayerFullAnchorRange
int getPlayerFullAnchorRange(@Nonnull UUID playerId, @Nonnull net.minecraft.resources.ResourceLocation dimension) Gets the full claiming anchor range (with the bonus) for a player UUID and dimension.The returned value is equal to the value returned by
getPlayerBaseAnchorRange(UUID)with the bonus anchor range added to it, which includes the player's own config bonus and the wilderness config bonus.- Parameters:
playerId- the player UUID, not nulldimension- the dimension ID to get the range for, not null- Returns:
- the full claiming anchor range
-
getPlayerFullAnchorRange
int getPlayerFullAnchorRange(@Nonnull net.minecraft.server.level.ServerPlayer player, @Nonnull net.minecraft.resources.ResourceLocation dimension) Gets the full claiming anchor range (with the bonus) for a logged in player and dimension.The returned value is equal to the value returned by
getPlayerBaseAnchorRange(ServerPlayer)with the bonus anchor range added to it, which includes the player's own config bonus and the wilderness config bonus.- Parameters:
player- the player, not nulldimension- the dimension ID to get the range for, not null- Returns:
- the full claiming anchor range
-
getActionListenerManager
Gets the API for the claim action listener manager for this claims manager where you can register claim action listeners.- Returns:
- the API for the claim action listener manager, not null
-
getChunkAccessOverriderManager
Gets the API for the chunk access overrider manager for this claims manager where you can register your chunk access overriders.- Returns:
- the API for the chunk access overrider manager, not null
-
tryToClaim(ResourceLocation, UUID, int, ResourceLocation, int, int, int, int, boolean)instead Tries to claim a chunk by a specified player.