Skip to main content

CannonRTP Protection Integrations

CannonRTP can validate candidate landing locations against several protection plugins before queueing them for use.

Supported Integrations​

The supported protection plugins are:

  • WorldGuard (also needs WorldEdit, which WorldGuard requires anyway)
  • Towny
  • Lands
  • GriefPrevention
  • HuskTowns
  • HuskClaims

All of these are declared as softdepend in plugin.yml (alongside WorldEdit and FreeMinecraftModels). CannonRTP works without any of them installed; missing plugins are silently skipped.

How Protection Checks Work​

  • Adapters are checked in a fixed order: WorldGuard, Towny, Lands, GriefPrevention, HuskTowns, HuskClaims.
  • A protection adapter is registered only when (a) its enabled toggle is true in protection.yml AND (b) the plugin is present and loaded on the server.
  • The first adapter that blocks a location stops the check and becomes the reported reason.
  • If a protection API throws an error, CannonRTP blocks that landing by default (fail-closed). This is governed by failOpenOnProtectionErrors in landing.yml.
  • If an adapter is enabled and its plugin is present but the adapter itself fails to load (a missing class, an incompatible API version), CannonRTP logs Failed to hook into <plugin> and keeps a placeholder for that plugin in the check chain, so the failure is not treated as if the plugin were not installed. failOpenOnProtectionErrors decides what the placeholder does:
    • false (default): the placeholder blocks every location with the reason its adapter failed to initialize (...), and cannons stop searching. Each cannon is marked Exhausted with protected land as the reason instead of sampling locations that cannot pass. Fix the integration, or disable it in protection.yml, then run /wc reload.
    • true: the placeholder allows every location, and the other adapters still run.

The global safety toggle for API failures is:

  • failOpenOnProtectionErrors (in landing.yml)

Default: false

When set to true, CannonRTP will allow landings to continue when a protection plugin cannot be queried safely. With false, a query error blocks that location with the reason its API could not be queried safely. Query errors are logged as warnings with either setting.

The /wc probe Command​

Admins can stand at any location and run /wc probe to test whether that location passes all enabled protection checks. The result reports which plugin blocked the location and why, or confirms that the protection adapters allow it. This command does not validate terrain, the airdrop column, the search radius, or the API location-validation event.

Config File​

All protection toggles live in plugins/CannonRTP/protection.yml. Keys are top-level (e.g. worldGuard.enabled, not protection.worldGuard.enabled).

Per-Plugin Behavior​

WorldGuard​

Config keys:

  • worldGuard.enabled
  • worldGuard.allowGlobalRegionOnly
  • worldGuard.allowBuildAllowedRegions
  • worldGuard.allowPassthroughRegions

Default behavior:

  • enabled by default
  • locations covered only by __global__ are allowed by default
  • regions with build=ALLOW are allowed by default
  • regions with passthrough=ALLOW are allowed by default
  • other matching protected regions are blocked

Towny​

Config keys:

  • towny.enabled
  • towny.allowWilderness
  • towny.allowNationZones
  • towny.allowClaimedTownBlocks

Default behavior:

  • enabled by default
  • worlds where Towny is not enabled are always allowed
  • wilderness is allowed
  • nation zones are blocked
  • claimed town blocks are blocked

Lands​

Config keys:

  • lands.enabled
  • lands.allowUnclaimedAreas
  • lands.allowClaimedAreas

Default behavior:

  • enabled by default
  • unclaimed areas are allowed
  • claimed areas are blocked

GriefPrevention​

Config keys:

  • griefPrevention.enabled
  • griefPrevention.allowWilderness
  • griefPrevention.allowAdminClaims
  • griefPrevention.allowPlayerClaims

Default behavior:

  • enabled by default
  • wilderness is allowed
  • admin claims are blocked
  • player claims are blocked

HuskTowns​

Config keys:

  • huskTowns.enabled
  • huskTowns.allowWilderness
  • huskTowns.allowAdminClaims
  • huskTowns.allowRegularClaims
  • huskTowns.allowFarmClaims
  • huskTowns.allowPlotClaims

Default behavior:

  • enabled by default
  • wilderness is allowed
  • admin claims are blocked
  • regular town claims are blocked
  • farm claims are blocked
  • plot claims are blocked

HuskClaims​

Config keys:

  • huskClaims.enabled
  • huskClaims.allowWilderness
  • huskClaims.allowAdminClaims
  • huskClaims.allowPlayerClaims

Default behavior:

  • enabled by default
  • wilderness is allowed
  • admin claims are blocked
  • player claims are blocked

Non-Protection Validation Still Applies​

Protection integrations are only one part of landing validation. A location can still be rejected because:

  • it is outside the world border
  • no safe surface exists
  • the feet or head space is blocked
  • the terrain matches the configured unsafe material lists
  • a CannonRTPLocationValidationEvent listener vetoes it (see API Events)

Failure Reporting​

When a cannon becomes exhausted (cannot find enough valid locations before searchTimeoutAttempts runs out, or stops early because a protection integration failed to load), the status output and player-facing messages list rejection categories encountered during that search window. Protected land appears if even one sample was rejected for that reason. The text does not include counts or rank categories by frequency, despite phrases such as "most samples" in the default wording. Use it to identify checks to investigate, not to measure which check rejected the most locations.