Skip to content

No Magic Zones

JasperLorelai edited this page Jul 26, 2023 · 5 revisions

No Magic Zones are defined in zones.yml. The region can be defined by two points of a cuboid region. To date, other region types from that are supported are from these plugins: WorldGuard and Residence.

Zone Configuration:

Option Description Variable Type Default Value
enabled Defines if this zone should be loaded by the plugin. Boolean true
type Valid zone types: cuboid, worldguard or residence. Check the further configuration of specific zones types by clicking on the specific zone type. String null
priority The priority of the zone is considered when multiple zones are overlapping. Scroll below for more info about Zone Processing. Integer 0
message String sent to the caster if the spell failed due to the caster being in this zone. String "You are in a no-magic zone."
allow-all Defines whether all spells should be allowed in the zone. Scroll below for more info about Zone Processing. Boolean false
disallow-all Defines whether all spells should be disallowed in the zone. Scroll below for more info about Zone Processing. Boolean true
This spell supports Spell Filter options.

Zone Type-Specific Configuration:

Cuboid:

Option Description Variable Type Default Value
world Defines the world location of the zone. String null
point1 Defines the first corner of the cuboid. This is a string in the format "x,y,z" (e.g. 10,100,0). String null
point2 Same as above but for the second corner. String null

World Guard:

Option Description Variable Type Default Value
world Defines the world location of the zone. String null
region Define the WorldGuard region name to use the cuboid location of. String null

Residence:

Option Description Variable Type Default Value
region Define the Residence region name to use the cuboid location of. String null

Zone Processing:

When a spell is cast the no magic zones are processed in the order based on defined priority. Higher priority means the zone will be processed first. When a zone is processed, it performs the following checks:

  1. If denied-spells or denied-spell-tags is defined and the spell is in that list, then the spell will be disallowed and zone processing will stop.
  2. If spells or spell-tags is defined and the spell is in that list, then the spell will be allowed and zone processing will stop.
  3. If disallow-all is true and 1. is not set, then the spell will be disallowed and zone processing will stop.
  4. If allow-all is true and 2. is not set, then the spell will be allowed and zone processing will stop.
  5. If none of the above checks succeeds, then zone processing will continue to the next zone.
  6. If there are no more zones to check, then the spell will be allowed.
Clone this wiki locally