Install, region-editing, flag, permission, configuration and API reference for server operators. For what players see in protected areas (build denials, safe zones, titles, map tint) see the Scuffed Protection gameplay guide.
- Plugin version: 1.1.54 (plugin name
ScuffedProtection)
Scuffed Protection is a chunk-based region and world-protection plugin. A region owns a set of 32 x 32 chunks (full height) or a whole world, and carries a build policy, a list of tri-state flags, members, messages, commands, movement and weather settings. Everything is managed from one in-game page opened with /sp.
Requirements
| Plugin | Version | Type |
|---|---|---|
| Hytale server | >=0.7.0-pre.0 <0.8.0 | Required |
Hytale:AssetModule | any | Required |
| EndlessGuilds | any (found by reflection) | Optional: guild claims are consulted on top of region rules |
| ScuffedProfessions | any (found by reflection) | Optional: vanilla crop harvests report profession XP |
| PlaceholderAPI | any | Optional: exposes scuffedprotection placeholders |
The jar ships an asset pack (the management page, the border particle and the Unified UI kit). No other plugin is needed.
Protection only runs in worlds that have at least one region, a world region, or an entry in fullWorldProtection. In any other world (dungeon instances, for example) every system returns immediately, so the plugin costs nothing there.
Admin & Staff Commands
There is one command, registered under two names. It is a player command: it cannot be run from the console.
| Command | Description |
|---|---|
/sp · /scuffedprotection | Open the management page. Needs the manage or the bypass permission |
/sp bypass · /scuffedprotection bypass | Toggle a session bypass for yourself. Run it again to turn it off. Cleared when you disconnect |
Without the manage or bypass permission the command answers You don't have permission to manage protection regions.
The management page
Every change on the page is applied and saved immediately. There is no save button and no reload step.
| View | What you do there |
|---|---|
| Region list | Shows all regions (8 per page) with chunk count and member count. New region creates one and opens its map. Server settings opens the global view |
| Chunk map | A 17 x 17 grid of chunks centred on where you stand, with terrain colours. Left click a cell to add that chunk to the region, right click to remove it. Green cells belong to this region, red cells to another region (those cannot be clicked), the gold outline is your own chunk |
| Region settings | Rename, delete, Apply to entire world toggle, the build policy button, 20 flag buttons, the mob cull interval, members, exempt players and the mob whitelist |
| Messages | Per-region titles, greeting and farewell text, enter and exit commands, blocked and allowed commands, custom deny message |
| Movement & minimap | Flight, walk and fly speed, minimap visibility and colour |
| Weather | Searchable weather picker that forces a sky on the region |
| Server settings | Global switches and the three global lists (see below) |
A new region starts empty. Each chunk can belong to only one region: adding a chunk that another region owns shows That chunk belongs to another region. There are no overlapping regions and no priorities. The two layers are:
- A chunk region wins wherever it has a chunk.
- A world region (one per world) covers every chunk with no region of its own.
If you create a new region while standing in a world that has a world region, the new region starts as a full copy of that world region's flags, members, build policy, messages and commands, so you only change what differs.
Region settings in detail
| Setting | Behaviour |
|---|---|
Build (MEMBERS / EVERYONE / NOBODY) | Who may place, break and edit blocks. Default MEMBERS. NOBODY blocks members too (only exempt players and bypass get through) |
| Members | Add by player name; the player must have joined the server at least once while the plugin was running (names are cached in players.json). 4 shown per page |
| Exempt players | Players the region's restrictions do not apply to: building, access flags, entry, exit, PvE, pet damage, crafting, commands. Zone-level flags (PvP, damage, fall damage, knockback, keep inventory, mob rules) still apply to them |
| Apply to entire world | Turns the region into the world region of the world you are standing in, renames it to the world's name. One world region per world |
| Mob cull interval | Shown only when the region blocks mob spawning. Seconds between sweeps that remove mobs already inside (0 or blank = off, any positive value is raised to at least 1) |
| Mob whitelist | Per-region patterns of mob type or role ids that are never culled (substring match, or * glob such as Citizen_*) |
| Walk / fly speed | Multiplier from 0 to 10 (0 = no override). Applied on top of the default base speed of 5.5 for walking and 10.32 for flying |
| Flight | NO CHANGE, GRANTED (all can fly) or BLOCKED (no flying). Cycles on each click |
| Minimap | SHOWN / HIDDEN on the world map, and a colour (default 33CC60) used for both the map tint and the border particles |
| Weather | Any weather asset loaded on the server, including ones added by mods. Clearing the weather returns players to the normal sky. Changes reach players standing in the region at once |
| Titles | Greeting and farewell title (the large line) and text (subtitle). Blank falls back to the global default |
| Enter / exit commands | A player command (run as the player) and a server command (run by the console) for each of enter and exit |
| Blocked commands | Comma or space separated command names (without the slash); * blocks all |
| Allowed commands | If not blank, only these commands work in the region and everything else is blocked. Takes precedence over blocked commands |
| Deny message | Replaces the default text for build, entry, exit and command denials in this region. {region} is replaced with the region name |
Command placeholders in enter and exit commands: %player% (player name) and %region% (region name). Titles accept %region%.
Blocked and allowed commands do not apply to members, exempt players or bypass users. They are enforced by wrapping the commands that exist when the plugin starts, so a command registered by a plugin that loads later is not covered.
Server-side enter and exit commands run with console authority. Turn on enterCommandWhitelistEnabled and list the permitted command names in enterCommandWhitelist to restrict them (it filters server commands only, not the player command).
Server settings view
| Control | Config key | Effect |
|---|---|---|
| Enabled | enabled | Master switch for the whole plugin |
| Creative bypass | creativeModeBypassProtection | Players in creative mode bypass protection |
| Particles | particlesEnabled | Border particles on or off |
| Map overlay | worldMapOverlayEnabled | Region tint on the world map |
| Hide culled mobs | mobCullHideInsteadOfRemove | Hide mobs from players instead of deleting them |
| Mob cull blacklist | mobCullBlacklist | Add or clear the global list of never-culled mob ids |
| Fully protected worlds | fullWorldProtection | Add or clear world names that are entirely locked |
| Interact allowlist | blocksThatIgnoreInteractRestrictions | Add or clear block ids that stay usable in locked areas (see the list notes) |
Flags
A flag is tri-state per region: allow, deny or default (unset). Unset flags use the configured default, which differs between a normal chunk region and a world region, meaning a region applied to an entire world (see flagDefaultsRegion and flagDefaultsGlobal). A flag button on the page sets an explicit allow or deny; flags you never touch stay on default.
The key column is the exact name used in claims.json, in the flag default maps and by other mods. Aliases are also accepted in claims.json and through the API (for example fall, chest, lava, harvest).
| Key | Page label | Region default | World region default | Effect when denied | Who it applies to |
|---|---|---|---|---|---|
pvp | Player vs Player | deny | allow | Player damage to players is cancelled if either the attacker or the victim stands in the region. Fire and poison within 20 seconds of a player hit count, as do hits by player-owned summons | Everyone, bypass included |
pve | Player vs Mobs | allow | allow | Players cannot damage mobs and NPCs in the region | Non-members, non-exempt, non-bypass |
entry | Entry | allow | allow | Players are teleported back to their last allowed position | Non-members, non-exempt, non-bypass |
exit | Exit / Leave | allow | allow | Players are teleported back inside | Non-members, non-exempt, non-bypass |
fall-damage | Fall Damage | allow | allow | Fall and out-of-world damage is cancelled | Everyone |
mob-damage | Mob Damage | allow | allow | Damage from mobs to players is cancelled (needs protectionMobDamage, off by default) | Everyone |
knockback | Knockback | allow | allow | Knockback on players is removed | Everyone |
damage | Take Damage | allow | allow | All damage to players is cancelled, whatever the source (safe zone) | Everyone |
keep-inventory | Keep Inventory | deny | deny | When allowed, players who die keep their items | Everyone |
pet-damage | Pet/Tamed Damage | allow | allow | Players cannot damage tamed pets or player-owned summons (the owner always can) | Non-members, non-exempt, non-bypass |
mob-spawning | Mob Spawning | allow | allow | Newly spawned mobs are removed or hidden | Mobs, with exemptions below |
entity-entry | Entity Entry | allow | allow | Mobs that wander in are removed or hidden | Mobs, with the same exemptions |
chest-access | Chest Access | deny | allow | Containers cannot be opened | Non-members, non-exempt, non-bypass |
use | Use / Interact | deny | allow | Interactive blocks cannot be used | Non-members, non-exempt, non-bypass |
door-access | Door Access | deny | allow | Doors cannot be used | Non-members, non-exempt, non-bypass |
seat | Sit in Chairs | allow | allow | Seats cannot be used | Non-members, non-exempt, non-bypass |
crafting | Crafting | allow | allow | Crafting is cancelled | Non-members, non-exempt, non-bypass |
fluid-place | Liquid Placement | deny | allow | Buckets cannot place water or lava (build rights are checked as well) | Non-members, non-exempt, non-bypass |
item-pickup | Item Pickup | allow | allow | Players cannot pick up items, and loose items in the region cannot be auto-collected | Everyone except bypass |
item-drop | Item Drop | allow | allow | Players cannot drop items | Everyone except bypass |
fly | Flight | unset | unset | Tri-state only: allow grants flight to everyone in the region, deny removes it, unset leaves players unchanged | Everyone except bypass |
notify | Owner Notify | allow | deny | When denied, no enter or exit title is shown (enter and exit commands still run) | Everyone |
map | Map Overlay | allow | allow | When denied, the region is not tinted on the world map | Visual only |
particles | Border Particles | allow | allow | When denied, no border particles are drawn | Visual only |
quest-npcs | Quest NPC Spawning | deny | allow | Not enforced by this plugin: other mods read it through isFlagAllowed(.., "quest-npcs") to decide whether wandering quest givers may spawn here | Other mods |
Notes on the table:
- Twenty flags have a button on the Region settings view:
pvp,pve,entry,exit,mob-spawning,entity-entry,chest-access,use,door-access,seat,crafting,damage,fall-damage,mob-damage,knockback,pet-damage,fluid-place,keep-inventory,particlesandquest-npcs.flyandmapare on the Movement & minimap view.notify,item-pickupanditem-drophave no button; set them inclaims.json(see Data & storage). - Access flags (
chest-access,use,door-access,seat,crafting,fluid-place): an unset flag uses the configured default, and members pass even when that default is deny. An explicitallowlets everyone through, an explicitdenyblocks members too. Exempt players always pass. pve,pet-damage,entryandexit: members and exempt players always pass, even with an explicit deny.light-access,item-grab,fire-spread,grass-spreadandmushroom-spreadexist as flag keys so other mods can query and set them, but this plugin does not enforce them itself.- Bypass users (permission, session toggle or creative bypass) skip the build, access, entry, exit, PvE, pet, crafting, item and command checks. They are not exempt from
pvp,damage,fall-damage,mob-damage,knockbackorkeep-inventory, because those describe the zone and not the player. - Mob exemptions: the global
mobCullBlacklist, the region's mob whitelist, and optionally every NPC that carries a display name (mobCullExemptNamedNpcs).
Build policy and what counts as building
The build policy (MEMBERS, EVERYONE, NOBODY) is checked for: placing, breaking and mining blocks; crop harvesting, fertilizing and watering; block state changes and variant cycling; bucket fluid placement and refilling; capture crates (checked at the target); and explosions (checked at the centre only, so a blast that starts outside and reaches in is not caught). It is enabled by protectionBlocks; explosions use their own switch protectionExplosions.
Denied build actions show You can't build here. or You can't build in '<region>'. (rate limited to one message per 1.5 seconds per player). Chest, door, use, crafting, item and PvP denials are silent. Entry, exit and command denials always message the player (entry and exit at most every 2 seconds).
Whole-world protection
Add a world name (case-insensitive) to fullWorldProtection, or turn a region into a world region with Apply to entire world. The two differ:
fullWorldProtection entry | World region | |
|---|---|---|
| Unclaimed chunks | Treated as locked: build, chests, doors, use and similar are denied for everyone except bypass users, mob spawning and PvP are denied, PvE and pet damage are denied | Use the region's settings, where unset flags fall back to the world region defaults (mostly allow) |
| Per-flag settings | None | Full region editing |
| Chunk regions inside | Still override | Still override |
Use fullWorldProtection for a lockdown spawn or hub; use a world region when you want a baseline with normal editing, then carve out chunk regions that differ.
Permissions
Only two permission nodes exist. Their names are config values.
| Node (default) | Config key | Effect |
|---|---|---|
scuffedprotection.manage | managePermission | Opens /sp and the management page |
scuffedprotection.bypass | bypassPermission | Bypasses region checks (see the notes under Flags). Also opens /sp, and allows /sp bypass |
Creative mode never grants access to the page; it only bypasses protection when creativeModeBypassProtection is on.
An empty value for either key means "everyone has it". Do not blank managePermission on a live server, or every player can edit regions.
permissionPrefix and permissionOverrides are present in the config file but no permission check reads them.
Configuration
File: config/config.json inside the plugin's ScuffedProtection data folder. It is written with all defaults on first start. Edits made with the management page are saved at once; edits made to the file by hand are read at startup, so restart the server (or reload the plugin) afterwards. Keys missing from the file keep their defaults. A corrupt file is moved aside as config.json.corrupt-<time> and the .bak copy is tried.
Master and protection switches
| Key | Default | Effect |
|---|---|---|
enabled | true | Master switch |
debug | false | Extra diagnostic logging |
protectionBlocks | true | Build policy checks |
protectionEntry | true | Enforce the entry flag |
protectionExit | true | Enforce the exit flag |
protectionPvp | true | Enforce the pvp flag |
allyKnockbackGuard | true | Where a world has PvP switched off, player attacks do not knock other players back (independent of regions) |
protectionPve | true | Enforce the pve flag |
protectionKeepInventory | true | Enforce the keep-inventory flag |
protectionFallDamage | true | Enforce the fall-damage flag |
protectionMobDamage | false | Enforce the mob-damage flag. Off by default |
protectionKnockback | true | Enforce the knockback flag |
protectionDamage | true | Enforce the damage (safe zone) flag |
protectionMobSpawning | true | Enforce mob-spawning for new spawns |
protectionItemPickup | true | Enforce item-pickup |
protectionItemDrop | true | Enforce item-drop |
protectionCrafting | true | Enforce crafting |
protectionEntityEntry | true | Enforce entity-entry |
protectionMovement | true | Enforce flight and speed settings |
protectionExplosions | true | Block explosions centred in a protected area |
protectionPetDamage | true | Enforce pet-damage |
protectionHarvestTools, protectionMultiBlockTools, protectionFluidFlow and protectionNaturalSpread also appear in the file but nothing reads them: sickle, hammer and fluid-placing protection is always part of protectionBlocks.
Lists and defaults
| Key | Default | Effect |
|---|---|---|
fullWorldProtection | [] | World names locked as a whole |
blocksThatIgnoreInteractRestrictions | [] | Block ids that stay usable in locked areas (case-insensitive substring or * glob). Covers doors, seats, containers and liquid placement. Builds after 1.1.54 also apply it to other usable blocks such as levers and benches |
creativeModeBypassProtection | false | Creative players bypass protection |
petRoleIdentifiers | ["Tamed_"] | NPC role or type ids treated as tamed pets for pet-damage |
ownedEntityOwnerComponents | ["com.airijko.endlessleveling.ecs.components.SummonOwnerComponent"] | Class names of other mods' owner-marker components, read by reflection to find a summon's owner so its attacks count as PvP and it counts as a pet. Each class needs a static getComponentType() and an instance getOwnerUuid() |
mobCullBlacklist | ["ScuffedNPC_", "Companion_", "Citizen_"] | Mob ids never culled, matched as case-insensitive substring or * glob |
mobCullExemptNamedNpcs | false | Also spare every NPC that has a display name |
mobCullHideInsteadOfRemove | false | Hide culled mobs from players instead of deleting them |
flagDefaultsRegion | {} | Per-flag default for chunk regions. Key is the flag key, value allow or deny (on, off, true, false also work) |
flagDefaultsGlobal | {} | Same, for world regions |
enterCommandWhitelistEnabled | false | Restrict server-side enter and exit commands |
enterCommandWhitelist | [] | Command names allowed when the whitelist is on |
Example: make chests open by default in every normal region and keep PvP off.
"flagDefaultsRegion": { "chest-access": "allow", "pvp": "deny" }
Titles
| Key | Default | Effect |
|---|---|---|
titlesEnabled | true | Show region enter and exit titles |
titlesZone | scuffedprotection | Zone id the title is shown under |
titleFadeIn | 0.2 | Seconds |
titleStay | 2.0 | Seconds |
titleFadeOut | 0.5 | Seconds |
defaultEnterTitle | Entered %region% | Used when a region has no title of its own |
defaultEnterSubtitle | empty | Used when a region has no greeting text |
defaultExitTitle | Left %region% | Same for leaving |
defaultExitSubtitle | empty | Same for leaving |
Map and particles
| Key | Default | Effect |
|---|---|---|
worldMapOverlayEnabled | true | Tint regions on the world map (M). The plugin installs its own map provider on every non-temporary world |
particlesEnabled | true | Border particles |
particlesDistance | 5.0 | Show borders within this many blocks of the player |
particlesStep | 0.5 | Spacing between particle points along an edge (minimum 0.1) |
particlesChance | 0.5 | Chance per point per refresh (0 to 1) |
particlesViewDistance | 75.0 | Other players within this range see the particles |
mapEnabled, updatesNotify, titlesPriority, particlesOnlyRealBoundaries and particlesMatchByXZOnly are in the file but unused. Only explicitly claimed chunks are tinted and given border particles; a world region does not paint the whole map.
Language file
lang/en_US.properties is created on first start. Edit the values to reword or translate; missing keys are added back, and extra keys you add are kept. Messages are prefixed with [ScuffedProtection] (prefix.text, prefix.color) and coloured by level (color.info, color.success, color.warn, color.error).
| Key | Default text |
|---|---|
deny.build | You can't build here. |
deny.build_region | You can't build in '{region}'. |
deny.entry | You can't enter '{region}'. |
deny.exit | You can't leave '{region}'. |
deny.command_region | That command is blocked in '{region}'. |
The file also defines deny.pickup, deny.use, deny.container, deny.door, deny.light, deny.pvp, deny.item_drop (each with a _region variant for most), region.enter, region.exit, create.ok and delete.ok. The plugin does not currently send these. A region's own deny message replaces the text of the five keys in the table.
Data & storage
All files live in the plugin's ScuffedProtection data folder.
| File | Contents |
|---|---|
config/config.json | Settings described above |
data/claims.json | All regions and all chunk assignments |
data/players.json | Cache of player UUID to name, used to add members by name |
lang/en_US.properties | Message catalog |
Every JSON write goes to a temp file, is flushed, keeps the previous version as <file>.bak, then replaces the live file atomically. A file that fails to parse is moved aside as <file>.corrupt-<time> and the .bak is loaded instead, so one bad file never stops the plugin from starting. Region edits are saved about 0.9 seconds after the last change and again at shutdown.
claims.json holds a formatVersion (currently 2), a regions list and a chunks list.
| Field | Meaning |
|---|---|
regions[].id | Lower-case id (letters, digits, _, -), generated from the name; unique ids get a -2, -3 suffix |
regions[].displayName | Name shown to players |
regions[].members, exempt | Lists of player UUIDs |
regions[].build | none (members), allow or deny |
regions[].flags | Map of flag key to allow or deny. Absent = default. Flag aliases are accepted when reading |
regions[].greeting, farewell, greetingTitle, farewellTitle | Texts |
regions[].playerEnterCommand, serverEnterCommand, playerExitCommand, serverExitCommand | Commands |
regions[].blockedCommands, allowedCommands, denyMessage | Command rules and custom deny text |
regions[].walkSpeedMultiplier, flySpeedMultiplier, mobSweepIntervalSeconds | 0 = off |
regions[].mapColor | Integer 0xRRGGBB |
regions[].mobWhitelist | Mob patterns |
regions[].worldRegion | World name when the region is a world region, otherwise null |
regions[].weatherId | Forced weather asset id or null |
chunks[] | { "world": "<lower-case world>", "cx": n, "cz": n, "region": "<region id>" } |
Edit claims.json only while the server is stopped; the plugin rewrites it from memory. A chunk entry that names a missing region is dropped on load. Deleting a region unassigns all of its chunks.
Integrations
| Plugin | Type | Use |
|---|---|---|
| EndlessGuilds | Optional | Guild claims are consulted for build, container, interaction and harvest decisions. See below |
| ScuffedProfessions | Optional | A vanilla right-click crop harvest that Protection allows is reported to ScuffedProfessions so the harvest earns profession XP |
| ScuffedNPCs, HyCitizens | Optional | Their NPC role prefixes are in the default cull blacklist, so companions and citizens are never removed from no-spawn regions |
| Endless Leveling | Optional | Summons (Army of the Dead and similar) are recognised through ownedEntityOwnerComponents, so their attacks count as PvP and they are protected as pets |
| PlaceholderAPI | Optional | See Placeholder API for installing it |
EndlessGuilds
Protection and Guilds both wrap the same engine interactions (fluid placement, block changes, crop harvest, fertilizing, farming stages, bucket refill and several more), and only one plugin can own each. Protection takes these back before assets decode and, at startup, registers a hook that asks Guilds about every decision made inside a guild claim. The hook can only add denials, never lift one: if either system denies, the action is denied. Guild harvest uses the HARVEST permission, fertilizing, watering and state changes use INTERACT, and other terrain edits use BUILD. Guild wartime farm and animal protection is respected. A Protection bypass does not bypass Guilds; use Guilds' own bypass for that. If Guilds is reloaded, reload or restart Protection afterwards. If another plugin re-registers one of the guarded interaction ids, the log warns that Protection took them back and that the other plugin's own checks for those ids will not run.
World map conflicts
Protection installs its own world-map provider. If another map mod (WorldProtect, for example) sets a provider on the same world, the region tint may not show; remove the other provider.
PlaceholderAPI placeholders
Identifier scuffedprotection, author Zbeve.
| Placeholder | Value |
|---|---|
%scuffedprotection_region% · %scuffedprotection_region_name% | Display name of the region the player stands in, empty if none |
%scuffedprotection_region_id% | Region id, empty if none |
%scuffedprotection_in_region% | Boolean: whether the player is in a region |
%scuffedprotection_region_count% | Total number of regions |
API for other mods
Everything below is plain Java in the package com.zbeve.scuffedprotection.api.
ScuffedProtectionApi
ScuffedProtectionApi.get() returns the instance, or null before Protection has started. Static helpers need no instance.
| Method | Returns |
|---|---|
isChunkProtected(world, chunkX, chunkZ) (static) | Whether an explicit region owns that chunk |
regionAt(world, blockX, blockZ) | RegionInfo of the governing region (chunk region, else world region) or null |
regionById(id) · allRegions() · isClaimed(world, x, z) | Region lookups |
isFlagAllowed(world, x, z, flagKey) | Effective flag value at a block. Unknown keys and unprotected land return true |
isFlagDeniedAt(world, x, y, z, flagKey) | True when the flag resolves to blocked there. Unknown key is false |
isPvpDeniedAt(world, x, y, z) · isDamageDeniedAt(world, x, y, z) | Gates for mods that apply their own damage |
isPlayerVsPlayerBlocked(attacker, victim, world, x, y, z) | True when a player hit should be dropped (self-damage is never blocked) |
isMember(regionId, player) | Membership test |
canBuild(player, world, x, y, z) | May this player build there |
canHarvest(player, world, x, y, z) | Same as a crop harvest: the build rule, but guild claims are asked for HARVEST |
canUseContainer(player, world, x, y, z) | Container access check |
RegionInfo exposes id(), displayName(), members(), exempt(), isMember(uuid), isExempt(uuid), chunkCount(), isFlagAllowed(flagKey) and overriddenFlags(). It is read-only. These queries return "allowed" when Protection is disabled or the land is unprotected.
Hooks
registerHook(ProtectionHook) and unregisterHook(...) let a mod influence allow and deny decisions. The hook receives a ProtectionQuery (action, player, world, x, y, z, regionId, and interactionId for engine interactions such as HarvestCrop) and returns ALLOW, DENY or NEUTRAL.
actionisbuildfor block edits, or a flag key such aschest-access,use,door-access,seat,craftingorfluid-place.- Any
DENYwins; otherwise anyALLOWgrants access even where the region would deny; otherwise the region's own answer stands. - Hooks run on the hot path. Keep them fast and side-effect free. A hook that throws is treated as
NEUTRALand logged once. - Hooks apply to build and access-flag checks only, not to PvP, damage or spawning.
Map claim providers
registerMapClaimProvider(key, provider) and unregisterMapClaimProvider(key). A MapClaimProvider returns tintAt(world, chunkX, chunkZ) as 0xRRGGBB, or 0 for no claim. Protection draws it on the world map wherever it has no region of its own. Call invalidateMapChunk(world, chunkX, chunkZ) after a claim changes.
Weather
registerWeatherProvider(key, (worldName, packedChunkIndex) -> weatherId)lets a mod with its own land force a sky on whoever stands in it. A region's own weather beats a provider, and providers are skipped while the world itself forces a weather. The function runs on the world thread for every player each tick, so it must be an in-memory lookup.unregisterWeatherProvider(key)removes it. Only JDK types cross this boundary.previewWeather(playerUuid, weatherId, seconds)shows a weather on one player for up to 120 seconds, saves nothing, and returns false if the weather does not exist.endWeatherPreview(playerUuid)stops it early.
External no-spawn areas (SpawnProtectionAPI)
SpawnProtectionAPI.register(owner, predicate) adds an area where new NPC spawns are removed. The predicate is a BiPredicate<String, int[]> called with the world name and {blockX, blockY, blockZ}. It must be fast, thread-safe and do no disk or network work. The call returns an AutoCloseable; close it when your mod stops. Registering the same owner twice throws. The area goes through the normal new-spawn filter: protectionMobSpawning must be on, the cull blacklist, region whitelists and named-NPC exemption still apply, and mobCullHideInsteadOfRemove decides whether mobs are hidden or removed. Registering does not remove mobs that already exist and does not change saved regions. A failing provider is logged once and does not cause a spawn to be suppressed or break the tick.
Troubleshooting
| Symptom | Check |
|---|---|
| Region rules do nothing in a world | Protection is idle in worlds with no region, world region or fullWorldProtection entry |
Nobody can use /sp | The player needs scuffedprotection.manage or scuffedprotection.bypass, or whatever you set in managePermission and bypassPermission |
'Name' hasn't joined this server yet. when adding a member | The player has not logged in since the plugin was installed; have them join once |
| Staff with bypass still cannot hit players in a spawn region | PvP, damage and similar zone flags ignore bypass by design. Change the region's flag |
| Mob damage flag has no effect | protectionMobDamage is off by default |
| No tint on the world map | worldMapOverlayEnabled off, the region's Map flag hidden, the region is a world region, or another map mod owns the world's map provider |
| Mobs from another mod keep disappearing | Add their id prefix to mobCullBlacklist or the region's mob whitelist, or turn on mobCullExemptNamedNpcs |
| Guild claim still denies something Protection allows | Expected: either system denying is enough. Use the guild's own bypass or permissions |
Hand edits to config.json or claims.json vanish | The plugin rewrites them from memory; edit with the server stopped |