Klasse WorldGuardGateway
java.lang.Object
de.delinkedde.areashopreborn.integration.WorldGuardGateway
Provides the controlled WorldGuard operations required by the application layer.
Methods must be called from the Paper server thread.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic final classOne-use restoration handle for a WorldGuard parcel merge.static final recordImmutable WorldGuard state used outside the adapter boundary.static final recordComplete WorldGuard access domains for one batched update.static final recordWorldGuard priority assignment for one managed region. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidapplyAccess(String worldKey, String protectionId, Collection<UUID> owners, Collection<UUID> members) Replaces WorldGuard owners and members with the supplied UUID sets.voidapplyAccessBatch(String worldKey, Collection<WorldGuardGateway.RegionAccess> definitions) Replaces access domains of several regions and performs one WorldGuard save.voidapplyEstatePriorities(String worldKey, Collection<WorldGuardGateway.RegionPriority> definitions) Enforces priorities and removes legacy parents for a complete world batch.voidapplyEstatePriority(String worldKey, String protectionId, int priority) Enforces the Estate priority model on an existing WorldGuard region.intCounts loaded Bukkit worlds for which WorldGuard exposes a region manager.booleanTests exact WorldGuard containment for one block.voidcreateCuboid(String worldKey, String protectionId, CuboidBounds bounds, String parentProtectionId) Creates a protected cuboid and optionally assigns a parent.voidcreateGeometry(String worldKey, String protectionId, RegionGeometry geometry, int priority) Creates a root WorldGuard region with the supplied geometry and priority.voidDeletes an existing WorldGuard region.Reads an existing WorldGuard region.fullHeightBounds(String worldKey, CuboidBounds selectedBounds) Expands an X/Z selection to the complete build height of its Bukkit world.listTopLevelCuboids(String worldKey) Lists top-level cuboid regions suitable for explicit city import.mergeGeometry(String worldKey, String targetProtectionId, String sourceProtectionId, RegionGeometry geometry) Replaces a target parcel geometry and removes a merged source region in one manager save.voidreplaceGeometry(String worldKey, String protectionId, RegionGeometry geometry, int priority) Replaces only the shape and height of an existing WorldGuard region.voidsetStateFlag(String worldKey, String protectionId, String flagName, String value) Sets, denies, or removes a WorldGuard state flag on a protected region.
-
Konstruktordetails
-
WorldGuardGateway
public WorldGuardGateway()Creates a stateless WorldGuard gateway.
-
-
Methodendetails
-
fullHeightBounds
Expands an X/Z selection to the complete build height of its Bukkit world.- Parameter:
worldKey- Bukkit namespaced world keyselectedBounds- original selection whose horizontal footprint is retained- Gibt zurück:
- bounds from the world's minimum build height through its inclusive maximum
-
find
Reads an existing WorldGuard region.- Parameter:
worldKey- Bukkit world key or nameprotectionId- WorldGuard region identifier- Gibt zurück:
- immutable region snapshot when present
-
availableManagerCount
public int availableManagerCount()Counts loaded Bukkit worlds for which WorldGuard exposes a region manager.- Gibt zurück:
- available region-manager count
-
listTopLevelCuboids
Lists top-level cuboid regions suitable for explicit city import.- Parameter:
worldKey- Bukkit world key or name- Gibt zurück:
- immutable snapshots sorted by WorldGuard identifier
-
createCuboid
public void createCuboid(String worldKey, String protectionId, CuboidBounds bounds, String parentProtectionId) throws Exception Creates a protected cuboid and optionally assigns a parent.- Parameter:
worldKey- Bukkit world key or nameprotectionId- generated WorldGuard region identifierbounds- cuboid boundsparentProtectionId- optional parent WorldGuard identifier- Löst aus:
Exception- when WorldGuard rejects the parent or cannot save the region
-
createGeometry
public void createGeometry(String worldKey, String protectionId, RegionGeometry geometry, int priority) throws Exception Creates a root WorldGuard region with the supplied geometry and priority.Estate hierarchy remains in SQLite. No WorldGuard parent is assigned because parent domains are inherited and would grant a city landlord access to sold parcels.
- Parameter:
worldKey- Bukkit world key or nameprotectionId- stable WorldGuard identifiergeometry- exact polygon and height rangepriority- WorldGuard priority- Löst aus:
Exception- when the identifier exists or WorldGuard cannot save the region
-
replaceGeometry
public void replaceGeometry(String worldKey, String protectionId, RegionGeometry geometry, int priority) throws Exception Replaces only the shape and height of an existing WorldGuard region.Owners, members, flags, and the requested Estate priority survive the replacement. Any legacy WorldGuard parent is deliberately removed.
- Parameter:
worldKey- Bukkit world key or nameprotectionId- existing WorldGuard identifiergeometry- replacement geometrypriority- Estate priority to enforce- Löst aus:
Exception- when the region is missing or WorldGuard cannot save the change
-
mergeGeometry
public WorldGuardGateway.GeometryMergeRollback mergeGeometry(String worldKey, String targetProtectionId, String sourceProtectionId, RegionGeometry geometry) throws Exception Replaces a target parcel geometry and removes a merged source region in one manager save.- Parameter:
worldKey- Bukkit world key or nametargetProtectionId- retained parcel identifiersourceProtectionId- archived source identifiergeometry- combined target geometry- Gibt zurück:
- rollback handle that can restore the exact in-memory WorldGuard objects
- Löst aus:
Exception- when either region is missing or WorldGuard cannot save the change
-
applyEstatePriority
public void applyEstatePriority(String worldKey, String protectionId, int priority) throws Exception Enforces the Estate priority model on an existing WorldGuard region.- Parameter:
worldKey- Bukkit world key or nameprotectionId- existing WorldGuard identifierpriority- city priority1or parcel priority2- Löst aus:
Exception- when the region is missing or WorldGuard cannot persist the change
-
applyEstatePriorities
public void applyEstatePriorities(String worldKey, Collection<WorldGuardGateway.RegionPriority> definitions) throws Exception Enforces priorities and removes legacy parents for a complete world batch.- Parameter:
worldKey- Bukkit world key or namedefinitions- region priorities- Löst aus:
Exception- when a region is missing or WorldGuard cannot persist the batch
-
contains
Tests exact WorldGuard containment for one block.- Parameter:
worldKey- Bukkit world key or nameprotectionId- existing WorldGuard identifierx- block X coordinatey- block Y coordinatez- block Z coordinate- Gibt zurück:
truewhen the region contains the block
-
applyAccess
public void applyAccess(String worldKey, String protectionId, Collection<UUID> owners, Collection<UUID> members) throws Exception Replaces WorldGuard owners and members with the supplied UUID sets.- Parameter:
worldKey- Bukkit world key or nameprotectionId- WorldGuard region identifierowners- owner UUIDsmembers- member UUIDs- Löst aus:
Exception- when the region is missing or cannot be saved
-
applyAccessBatch
public void applyAccessBatch(String worldKey, Collection<WorldGuardGateway.RegionAccess> definitions) throws Exception Replaces access domains of several regions and performs one WorldGuard save.- Parameter:
worldKey- Bukkit world key or namedefinitions- complete region access definitions- Löst aus:
Exception- when a region is missing or WorldGuard cannot save the batch
-
setStateFlag
public void setStateFlag(String worldKey, String protectionId, String flagName, String value) throws Exception Sets, denies, or removes a WorldGuard state flag on a protected region.- Parameter:
worldKey- Bukkit world key or nameprotectionId- WorldGuard region identifierflagName- registered state-flag namevalue-allow,deny, orunset- Löst aus:
Exception- when the region, flag, or value is invalid or saving fails
-
delete
Deletes an existing WorldGuard region.- Parameter:
worldKey- Bukkit world key or nameprotectionId- WorldGuard region identifier- Löst aus:
Exception- when WorldGuard cannot save the change
-