Package xaero.pac.common.claims.api
Interface IClaimsManagerAPI
- All Known Subinterfaces:
IClientClaimsManagerAPI
,IServerClaimsManagerAPI
public interface IClaimsManagerAPI
API for a claims manager
-
Method Summary
Modifier and TypeMethodDescriptionget
(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.getDimension
(net.minecraft.resources.ResourceLocation dimension) Gets the read-only claims manager for a specified dimension ID.getPlayerInfo
(UUID playerId) Gets or creates the claim info instance for a player UUID.Gets the claim change tracker that lets you register claim change listeners.boolean
hasPlayerInfo
(UUID playerId) Checks whether a player has claim info.
-
Method Details
-
hasPlayerInfo
Checks whether a player has claim info.- Parameters:
playerId
- UUID of the player, not null- Returns:
- true if the player with UUID
playerId
has claims info, otherwise false
-
getPlayerInfo
Gets or creates the claim info instance for a player UUID.- Parameters:
playerId
- UUID of a player, not null- Returns:
- the player claim info, not null
-
get
@Nullable IPlayerChunkClaimAPI get(@Nonnull net.minecraft.resources.ResourceLocation dimension, int x, int z) Gets the claim state for a specified chunk.- 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) Gets the claim state for a specified chunk.- 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) Gets the claim state for a specified chunk.- 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 IDimensionClaimsManagerAPI getDimension(@Nonnull net.minecraft.resources.ResourceLocation dimension) Gets the read-only claims manager for a specified dimension ID.- Parameters:
dimension
- the dimension ID, not null- Returns:
- the dimension claims manager, null if no claim data exists for the specified dimension
-
getTracker
Gets the claim change tracker that lets you register claim change listeners.The tracker notifies the registered listeners when claim changes occur.
- Returns:
- the claim change tracker
-