Astral Realms Documentation Help

Roles, Permissions & Settings

Every island governs who can do what through two independent typed systems: roles (per-island, weighted, carry a set of IslandPermissions that gate member/co-op actions) and settings (per-island, environment flags that gate world behavior like PvP, explosions, and time/weather). Both catalogues — the full list of permissions and the full list of settings — are fixed by the plugin's enums; only which ones a role grants, and which ones an island has toggled on, are per-island data.

Roles

roles.yml structure

roles.yml seeds every new island's role set. It deserializes to RolesConfiguration, a map of role id → entry:

Field

Type

Required

Description

(map key)

String

Yes

The role's id, e.g. member. Free-form — not an enum.

type

IslandRole.Type (VISITOR \|COOP \|MEMBER)

Yes

Deserializes into IslandRole's kind field. VISITOR/COOP are the two system roles Island#hasPermission falls back to for non-members; MEMBER is used for every role a member can actually hold, including admin-tier ones.

weight

int

Yes

Seniority. Higher outranks lower — drives promote/demote stepping and the "higher role" protections below. Must be unique per island; the shipped roles use 03.

default

boolean

Yes (@Setting("default"))

Marks the role new members are given. MemberService#addMember looks up the island's role flagged isDefault() and throws IllegalStateException if none exists — exactly one role must set default: true.

name

String

Yes

Display name (used in role-management menus and in messages like member-promoted-sender).

icon

ItemStackWrapper

Yes

material/name (and optionally lore, etc.) for the role. Parsed into the config record but not currently exposed on the IslandRole model or its placeholder — the shipped island-roles menu renders a static player_head for every role instead of this icon.

permissions

List<String>

Yes

Raw keys resolved against IslandPermission — either exact enum names or the ALL wildcard. Kept as strings in the config record so an unrecognised key logs a warning and is skipped rather than failing the whole file to load.

RoleService.defaultRoleSeeds builds one RoleSeed (an IslandRole + its resolved EnumSet<IslandPermission>) per entry, in roles.yml iteration order; IslandRepository#create inserts them as part of the single island-creation transaction. roles.yml only affects islands created afterward/is reload re-parses the file but does not retroactively touch existing islands' persisted roles or permissions.

Shipped roles

Id

type

weight

default

Permissions

visitor

VISITOR

0

false

RATINGS_SHOW only.

co-op

COOP

1

false

Build/break/interact-with-the-world grants (BUILD, BREAK, BRUSH, DROP_ITEMS, PICKUP_DROPS, ISLAND_CHEST, FLY, animal/entity interactions, ENDER_PEARL, CHORUS_FRUIT, WIND_CHARGE, IGNITE_CREEPER, SCULK_SENSOR) — no island management, economy, or warps.

member

MEMBER

2

true

Everything co-op has, plus SPAWNER_BREAK, VALUABLE_BREAK, SET_HOME, SET_WARP, DELETE_WARP, DEPOSIT_MONEY, WITHDRAW_MONEY, RANKUP, INVITE_MEMBER, COOP_MEMBER, UNCOOP_MEMBER, EXPEL_PLAYERS. This is the role new members join with.

admin

MEMBER

3

false

ALL — every IslandPermission. Note this is type: MEMBER, not a separate IslandRole.Type; "admin" is just the highest-weight member-tier role.

Role weight & hierarchy

weight is the whole hierarchy mechanism — there is no separate rank field. It is used in two places:

  • Island#canEditRole(player, role)true for admins/the owner; for anyone else, only if their own member role's weight is strictly greater than the target role's weight. This gates [toggle-role-permission] and RoleService#updatePermissions (backing [update-role-permissions]): failing it sends ASMessages.ROLE_PERMISSION_HIGHER (" You cannot assign a role higher than your own. ").

  • Promote/demote stepping (MemberService#promote/#demote, see Members) — walks the island's roles ordered by ascending weight and moves the target one step up/down that ladder. Non-owners can't promote a member to, or demote a member from, a weight at or above their own; those checks (and kicking/banning a peer-or-senior member) fail with ASMessages.MEMBER_HIGHER_ROLE (" You cannot do that to a member whose role is equal to or higher than yours. ").

In short: ROLE_PERMISSION_HIGHER guards editing a role's permission set, while MEMBER_HIGHER_ROLE guards acting on a member whose role outranks (or matches) the actor's.

IslandPermission

IslandPermission is a fixed enum — the full catalogue an island can grant, never extended per-island. Each constant implements ConfigurationEnum<ItemStackWrapper>; permissions.yml supplies the display item (material, name, lore) for every constant, keyed by its kebab-case name (SPAWNER_BREAKspawner-break) and loaded via ConfigurationManager#loadEnum into the constant's value.

Permission

Notes

ALL

Wildcard — RoleService#resolvePermissions expands it to every other constant at role-seed time; IslandRole#hasPermission also short-circuits true if the role (or a pending toggle) has ALL set directly.

ANIMAL_BREED, ANIMAL_SHEAR, DYE_SHEEP, FERTILIZE, FISH, LEASH, NAME_ENTITY, SADDLE_ENTITY, ENTITY_RIDE, VILLAGER_TRADING, MINECART_ENTER, MINECART_OPEN, IGNITE_CREEPER, SCULK_SENSOR

Entity/world interaction grants — each maps to one IslandPermissionsListener handler.

BUILD, BREAK

Block place/break. BREAK is only checked when the broken block is neither a spawner nor a "valuable" block (see below).

BRUSH

Brushing suspicious sand/gravel.

DROP_ITEMS, PICKUP_DROPS

Dropping/picking up items on the island.

ISLAND_CHEST

Access to the island chest.

FLY

Toggling flight outside creative/spectator.

ENDER_PEARL, CHORUS_FRUIT

Teleporting via ender pearl / chorus fruit consumption.

WIND_CHARGE

Launching wind charge projectiles.

SPAWNER_BREAK

Breaking a SPAWNER block specifically (takes priority over BREAK).

VALUABLE_BREAK

Breaking a block matched by block-values.yml (takes priority over BREAK).

SET_HOME, SET_WARP, DELETE_WARP

Home/warp management.

DEPOSIT_MONEY, WITHDRAW_MONEY

Island bank access.

RANKUP

Ranking up the island.

RATINGS_SHOW

Viewing island ratings — the only permission the visitor role gets.

INVITE_MEMBER

Sending member invitations (InviteMemberAction, InvitationCommand).

COOP_MEMBER, UNCOOP_MEMBER

Granting/revoking a co-op trust (CoopPlayerAction, CoopCommand, CoopService).

KICK_MEMBER, EXPEL_PLAYERS

Removing a member / expelling a visitor.

BAN_MEMBER

Banning a player from the island (gates the island-bans menu).

PROMOTE_MEMBERS, DEMOTE_MEMBERS

Role-ladder stepping (MemberService#promote/#demote, MemberCommand).

SET_ROLE

Assigning a member's role (gates the island-member-manage/island-member-role menus).

SET_PERMISSION

Toggling a role's permissions — required by both ToggleRolePermissionAction and RoleService#updatePermissions.

SET_SETTINGS

Toggling island settings — required by both ToggleIslandSettingAction and IslandService#updateSettings.

OPEN_ISLAND, CLOSE_ISLAND, CLOSE_BYPASS

Island lock state and bypassing it while closed.

EXPEL_BYPASS

Bypassing being expelled.

CHANGE_NAME

Renaming the island.

SET_BIOME

Changing the island's biome.

DISBAND_ISLAND

Disbanding the island.

Enforcement

Island#hasPermission(Player, IslandPermission) is the single check every command, action, and listener goes through:

  1. The island owner and anyone with the skyblock.admin Bukkit permission always pass.

  2. If the player is a member, the check is member.isOwner() || member.role().hasPermission(permission).

  3. Otherwise, if the player has an active co-op grant, the check falls back to the island's single COOP-type role's permissions (co-ops don't hold an individual role — they all share whatever the island's one COOP role grants).

  4. Anyone else (a bare visitor) has no permissions at all through this path.

IslandRole#hasPermission itself checks the role's own ALL /specific grant, folding in any pending (un-flushed) toggle from the permissions menu.

On island servers only, IslandPermissionsListener calls hasPermission on the relevant Bukkit event and cancels it when the check fails — e.g. BlockBreakEvent against BREAK/SPAWNER_BREAK/VALUABLE_BREAK depending on the block, BlockPlaceEvent against BUILD, PlayerToggleFlightEvent against FLY, EntityMountEvent against ENTITY_RIDE/MINECART_ENTER, and so on for every listener method in the class. IslandSettingsListener (also island-server-only) uses Island#isSettingEnabled the same way for IslandSettings. Both listeners register only when SkyblockConfiguration#isIslandServer() is true — see Overview.

IslandSettings

IslandSettings is the environment-flag counterpart to permissions — per-island, not per-role. Like IslandPermission, it implements ConfigurationEnum<ItemStackWrapper>; settings.yml supplies the display item per constant (ALWAYS_DAYalways-day), loaded the same way via loadEnum.

Setting

Effect

ALWAYS_DAY

Locks world time to 0 (dawn) and disables the daylight cycle gamerule.

ALWAYS_MIDDLE_DAY

Locks world time to 6000 (noon).

ALWAYS_NIGHT

Locks world time to 14000 (night).

ALWAYS_MIDDLE_NIGHT

Locks world time to 18000 (midnight).

ALWAYS_RAIN

Forces storm on, disables the weather-cycle gamerule; wins over ALWAYS_SHINY if both are enabled.

ALWAYS_SHINY

Forces storm/thunder off, disables the weather-cycle gamerule.

CREEPER_EXPLOSION

Allows creeper explosions to damage blocks.

CROPS_GROWTH

Allows crops (SkyblockTags.CROPS) to grow or spread — covers BlockGrowEvent and the bamboo/kelp-style BlockSpreadEvent.

EGG_LAY

Allows chickens to lay eggs.

ENDERMAN_GRIEF

Allows endermen to pick up/place blocks.

FIRE_SPREAD

Allows fire to spread or ignite via BlockSpreadEvent/BlockBurnEvent.

GHAST_FIREBALL

Allows ghast fireball explosions to damage blocks.

LAVA_FLOW

Allows lava to flow (BlockFromToEvent from a LAVA source).

PVP

Allows player-vs-player damage.

TNT_EXPLOSION

Allows TNT/TNT minecart explosions to damage blocks.

TREE_GROWTH

Allows saplings to grow into trees (StructureGrowEvent).

WATER_FLOW

Allows water to flow (BlockFromToEvent from a WATER source).

WITHER_EXPLOSION

Allows wither/wither skull explosions to damage blocks.

Conflict groups

IslandSettings#conflictingSettings() defines two mutually-exclusive groups — only one member of each can be enabled on an island at a time:

  • Time locks: ALWAYS_DAY, ALWAYS_MIDDLE_DAY, ALWAYS_NIGHT, ALWAYS_MIDDLE_NIGHT

  • Weather locks: ALWAYS_RAIN, ALWAYS_SHINY

Island#toggleSetting enforces this client-side of persistence: enabling a setting that has a conflicting group member currently on stages that conflicting member off in the same dirtySettings flush. Settings outside these two groups (PVP, CROPS_GROWTH, etc.) have no conflicts and toggle independently.

Applying environment settings

Because time/weather locks are world state rather than cancellable events, IslandSettingsListener handles them differently from the rest of the catalogue:

  • IslandSettingsListener.applyEnvironment(Island, World) is a static method that reads the active time/weather locks and calls World#setTime/setGameRule(DO_DAYLIGHT_CYCLE, …)/setStorm/setThundering/setGameRule(DO_WEATHER_CYCLE, …) directly. It runs on world load and again every time settings are flushed (from [toggle-island-setting] and [update-island-settings]).

  • onTimeSkip/onWeatherChange/onThunderChange cancel any event that would fight an active lock in the interim (e.g. a TimeSkipEvent while any time lock is set, or Minecraft's natural weather engine trying to clear rain while ALWAYS_RAIN is on).

  • Every other setting (PVP, CREEPER_EXPLOSION, CROPS_GROWTH, …) is enforced purely by cancelling the relevant Bukkit event when Island#isSettingEnabled is false — no gamerule or world-state mutation.

Default settings on new islands

config.yml's default-settings list is applied to every setting at island creation — IslandRepository#create inserts each IslandSettings constant with its enabled state taken from whether it appears in SkyblockConfiguration#defaultSettings(). The shipped default enables CROPS_GROWTH, EGG_LAY, ENDERMAN_GRIEF, FIRE_SPREAD, GHAST_FIREBALL, LAVA_FLOW, PVP, TNT_EXPLOSION, TREE_GROWTH, WATER_FLOW, and WITHER_EXPLOSION — every setting except the six time/weather locks. See Configuration for the full config.yml reference.

Four AstralSkyblock actions back the roles/permissions/settings menus (island-roles, island-permissions, island-settings) — all four are player-only and message the executor with ASMessages.NO_PERMISSION and return without effect when the underlying permission check fails.

toggle-role-permission

Flips one IslandPermission on one role, staging the change in the role's dirty-permission map (not yet persisted). Requires the executor to have SET_PERMISSION on the island and to outrank the target role.

Argument

Type

Description

(1)

Island

The island the role belongs to.

(2)

IslandRole

The role being edited.

(3)

IslandPermission

The permission being toggled.

actions: - "[toggle-role-permission] %parameters_island% %parameters_role% %parameter_permission%" - "[refresh-layout] permission"

update-role-permissions

Flushes a role's staged permission toggles to the database via RoleService#updatePermissions, re-checking SET_PERMISSION and the role-weight guard before writing. Sends ROLE_PERMISSION_UPDATE_SUCCESS/ROLE_PERMISSION_UPDATE_FAILURE to the executor. Wired as a close-actions hook on the island-permissions menu, so it fires once when the player backs out or closes the menu rather than on every individual toggle.

Argument

Type

Description

(1)

Island

The island the role belongs to.

(2)

IslandRole

The role whose staged toggles are flushed.

close-actions: - "[update-role-permissions] %parameters_island% %parameters_role%"

toggle-island-setting

Flips one IslandSettings flag, staging it in the island's dirty-settings map and immediately re-applying the environment (time/weather gamerules and state) if the island's world is loaded on the current server. Requires SET_SETTINGS.

Argument

Type

Description

(1)

Island

The island being edited.

(2)

IslandSettings

The setting being toggled.

actions: - "[toggle-island-setting] %parameters_island% %parameter_setting%" - "[refresh-layout] setting"

update-island-settings

Flushes an island's staged setting toggles via IslandService#updateSettings, re-checking SET_SETTINGS before writing and re-applying the environment once persistence succeeds. Sends SETTINGS_UPDATE_SUCCESS/SETTINGS_UPDATE_FAILURE. Wired as a close-actions hook on island-settings.

Argument

Type

Description

(1)

Island

The island whose staged toggles are flushed.

close-actions: - "[update-island-settings] %parameters_island%"

Placeholders

Both catalogues expose a chainable, per-item placeholder namespace reached by iterating an ItemProvider:

Placeholder

Returns

Notes

%role_permissions%

Iterable of all 52 IslandPermissions for that role, in enum order

Wrapped in an IslandPermissionsItemProvider — pass through to a layout provider: to list a role's permissions in a menu (see the island-permissions menu example above).

%permission_id%

The permission's enum name, e.g. SPAWNER_BREAK

Resolved by IslandPermissionPlaceholder (namespace permission), reached by iterating %role_permissions%.

%permission_item%

The permissions.yml display item for this permission

%permission_enabled%

Whether the role it was iterated from currently has this permission

IslandRole#hasPermission, including any un-flushed toggle.

%island_settings%

Iterable of all 18 IslandSettings for that island, in enum order

Wrapped in an IslandSettingsItemProvider — pass through to a layout provider: to list an island's settings in a menu.

%setting_id%

The setting's enum name, e.g. ALWAYS_RAIN

Resolved by IslandSettingsPlaceholder (namespace setting), reached by iterating %island_settings%.

%setting_item%

The settings.yml display item for this setting

%setting_enabled%

Whether the island currently has this setting on

Island#isSettingEnabled, including any un-flushed toggle.

Island also exposes %island_hasPermission_<PERMISSION>% directly (no role/iteration needed) — this is what menu view-requirements use to hide governance items the viewing player can't use, e.g. %skyblock_player_island_hasPermission_BAN_MEMBER%. See Placeholders for the full %skyblock_*% root and every other namespace.

See also

  • Islands — island lifecycle, blueprints, and upgrades.

  • Members, Co-ops & Invitations — promote/demote, kick/ban, and invitation flows that consume role weight and IslandPermission checks.

  • Configurationconfig.yml's default-settings, and the rest of the shipped configuration surface.

  • Placeholders — the full placeholder catalogue.

Last modified: 25 July 2026