Astral Realms Documentation Help

Town Settings

TownSettings is an EnumSet on every town. Settings are toggles, not scalars — each one is either on or off, and each one is read by SettingsListener to filter the corresponding Bukkit event.

Subzones can either inherit the parent town's settings or override them per-setting; see Subzones.

Catalogue

Setting

Gates

SPAWN_ANIMALS

Passive mob spawning (cows, sheep, …).

SPAWN_MONSTERS

Hostile mob spawning.

PVP

Player-vs-player damage.

MOB_DAMAGE

Mobs damaging players.

MOB_DROPS

Mob drops on death.

FALL_DAMAGE

Fall damage to players.

EXPLOSIONS_DAMAGE

Block damage from explosions (TNT, creepers, end crystals).

FIRE_SPREAD

Fire spread and block burning.

LEAF_DECAY

Natural leaf decay.

CORAL_DEATH

Out-of-water coral fade.

CROPS_GROWTH

Crop growth.

TREE_GROWTH

Sapling → tree.

VINE_GROWTH

Vine and similar growth.

SNOW_ACCUMULATION

Snow forming during snowfall.

SNOW_MELT

Snow / ice fading.

GRASS_SPREAD

Grass / mycelium spread.

BLOCK_GRAVITY

Falling blocks (sand, gravel).

AMETHYST_GROWTH

Budding amethyst progression.

STOMP_PLANTATIONS

Players trampling farmland.

TRAMPLE_FARMLAND

Other entities trampling farmland.

WATER_FLOW

Liquid water flow into the claim.

LAVA_FLOW

Liquid lava flow into the claim.

FROST_WALKER

Frost Walker enchantment effect.

VISITORS_NOTIFICATIONS

Welcome / goodbye messages to non-members.

settings.yml > settings.<NAME> defines the icon used in the settings menu. settings.yml > default-settings lists the settings enabled on every newly created town.

Toggling

Path

Permission

Menu via toggle-town-settings action

SETTINGS_CHANGE

Bulk save via update-town-settings action

SETTINGS_CHANGE

A toggle fires a TownSettingChangedEvent (non-cancellable) and writes a UPDATE_SETTINGS log entry with the typed SettingsLogPayload.

Dirty tracking

Town.toggleSetting(setting) flips the bit in the EnumSet and pushes the change into a dirtySettings map. flushDirtySettings() returns and clears that map; the action layer uses it to batch a single DB write for menu sessions that toggle many entries at once.

Wilderness defaults

Settings applied to unclaimed land come from config.yml > wilderness.settings. They share the same enum so you can mix and match — e.g. SPAWN_ANIMALS and SPAWN_MONSTERS on outside, off inside.

Programmatic access

TownAPI.hasSettingEnabled(location, TownSettings.PVP);

Returns true when:

  • The location is inside a town claim and the town has the setting on, or

  • The location is inside a subzone that inherits and the parent town has it on, or

  • The location is inside a subzone with its own copy enabling the setting, or

  • The location is wilderness and the setting is in wilderness.settings.

Last modified: 25 July 2026