CloudPrivates — claim regions with 9 protection mechanics

A claim is not just "no digging here". It's a block that decides for itself what happens to anyone who tries to break it: stay silent, hit them with an explosion, or fling the offender over the horizon with a random teleport.

What it is

CloudPrivates is a claim-region plugin for Paper 1.19.4 from the Cloud Delight studio (the author in plugin.yml is Vitaly). A player places a special block — and a protected cube rises around it. But instead of one universal claim block, there are nine types, each with its own character: one holds the perimeter and repairs itself, another hits with an explosion, a third collects thrown-out loot, a fourth hands out buffs to its own and debuffs to outsiders, and a fifth disappears from radars entirely — no hologram, no response to a click.

The role model isn't "owner + a list of names" but five permission levels and six independent flags on each claim. Management is through a GUI on right-click, and commands duplicate almost the same from chat. Holograms are an optional layer through the soft dependency DecentHolograms. And CloudPrivates hands its state to neighboring ecosystem plugins directly through the static PrivatesAPI.

How it works

The plugin recognizes a claim item by a PDC tag inside the item meta (privates:type), not by block appearance — you can't swap in an ordinary block. If the spot is free, the block is placed and a protective cube rises around the center; if it overlaps someone else's claim, placement is rejected unless the config allows otherwise (allow-overlap: false by default). The check doesn't iterate over all of the server's claims: each is indexed by the chunks (16×16) its cube touches, and a new placement is checked only against claims from the same chunks.

Size is set at the type level: all nine default to 25×25×25, i.e. a 12-block radius from the center on every axis, including height. A right-click on the center (main hand only) opens the management GUI — details in a separate section below.

  • Owner (weight 4) — everything, including transferring ownership (/priv setowner) and removing the claim.
  • Co-owner (weight 3) — members, roles (except assigning other co-owners), flags; can't remove the claim.
  • Trusted (weight 2) — always builds, breaks, and opens chests and doors: the build/container/interact flags don't apply to them at all.
  • Member (weight 1) — acts per flags like a guest, but is treated as one of "our own" for the alarm, buff, and debuff.
  • Guest (weight 0) — only what public flags allow; not stored as a separate entry.

A subtlety: the "trusted" role (TRUSTED) and the isTrusted() method in the code are different things. The build/container/interact flags are ignored specifically by the TRUSTED role and above, while any member regardless of role is exempt from the alarm and debuff and gets the buff. No one but the owner or an admin can promote someone to co-owner — for a plain co-owner, the attempt quietly rolls back to "member".

Flags apply to the whole cube: build covers building and buckets, container — chests/barrels/furnaces, interact — doors/buttons/levers — for everyone below TRUSTED. pvp off — combat is forbidden (by the victim's location, not the attacker's). mobs off — hostile mobs don't spawn naturally; mobs spawned by command or egg are not affected by the flag. explosion off — explosions don't destroy blocks, except the self-detonation of an explosive claim. Defaults come from settings.default-flags, and a type can override them with its own flags: block.

Only the owner or privates.bypass can remove a claim outright: by breaking the center or with a GUI button — the item returns to the inventory, the hologram disappears instantly, with no confirmation. The /priv delete command gives the same result but with protection against an accidental entry: a 15-second timer, and repeating within that window removes the claim. A member can't break the center. A guest who finishes off the center destroys the claim in any case — and what happens next depends on the type.

9 claim types

The material, CMD texture (custom-model-data 920001–920009 — the plugin's range, don't change it), and cube size of each type are configured independently. The word "radius" in the config has a double meaning: the cube's radius (size/2, 12 by default for all) is the PROTECTION area, while the separate radius parameter of the explosive and ender claims is the EFFECT area when the center is destroyed, and it doesn't have to match the cube. Below are the factory values and the mechanics from the code.

1. Hidden claim (HIDDEN)

Material SMOOTH_STONE, CMD 920001, cube 25×25×25 (radius 12) — standard, but the behavior is not. The hologram is disabled hard in the code: even with settings.hologram: true, the plugin always removes it instead of creating it. A right-click on the center by a non-member opens nothing and writes nothing in chat — whereas for the other eight types a guest at least learns the owner and cube size. /priv info for a non-member shows only "information unavailable". Judging by the item text, a hidden claim also isn't highlighted for other players' random /rtp — for third-party rtp scripts there's a static PrivatesAPI.isProtected(). Flags, roles, removal, effects — all as with a regular claim, the only difference is invisibility.

2. Explosive claim (EXPLOSIVE)

Material RESPAWN_ANCHOR, CMD 920002, cube 25×25×25. When a non-member breaks the center, the plugin detonates a real explosion with power: 12.0 (vanilla TNT is 4.0), with the attacker as the source so that the protection of other cubes nearby works as it should. A tick later comes a second pass, manual finishing in a sphere of radius radius: 10: obsidian, crying obsidian, chests, barrels, ender chests, and shulkers are broken — what an explosion usually doesn't take (obsidian is almost immune to explosions). Other people's claims within the finishing radius are not touched. In the same pass all living entities take entity-damage: 40.0 damage — 20 hearts, certain death for a player without armor — and all drops on the ground are cleared. The finishing radius (10) is smaller than the cube's protection radius (12) — the explosion doesn't necessarily reach the edge of the territory.

3. Protected claim (PROTECTED)

Material CRYING_OBSIDIAN, CMD 920003, cube 25×25×25. Every inner-interval-seconds: 60, the plugin walks all 26 blocks of the 3×3×3 shell around the center (it doesn't touch the center itself) and, wherever a block doesn't match the restoration material, places it again — plain OBSIDIAN by default (the regen.material setting is shared by both protected types and is not crying obsidian like the center block itself). The check runs once a second through a shared ticker common to all claims, with no separate timer for each. In the factory config this is the only type with its own flags: block — duplicated one-to-one with the global values, just a sample for editing.

4. Protected+ claim (PROTECTED_PLUS)

Material LODESTONE, CMD 920004, cube 25×25×25. The same regeneration, but in two layers: the 3×3×3 shell is patched every inner-interval-seconds: 60, and the wider 5×5×5 one every outer-interval-seconds: 180, with the same material. Even if an attacker has dug a corridor two blocks deep from the edge, the outer layer closes up after three minutes — the version for those for whom "Protected" is not enough.

5. Alarm claim (ALARM)

Material SCULK_CATALYST, CMD 920005, cube 25×25×25. It holds the perimeter less than it watches it — three independent triggers. Intrusion: a non-member (and non-bypass) changed block coordinate inside the cube. Explosion: if even one of the blocks broken by any explosion nearby is inside its cube — it fires from someone else's TNT or a creeper nearby too, not only from an attack on itself. Center destruction is a separate event when a non-member finishes off the block. One notification function handles all three with a throttle of throttle-seconds: 10 — per claim as a whole, not per player: new triggers stay silent for 10 seconds. The message goes to chat for the owner and all online members, and if webhook-url is filled in, a POST with JSON (claim id, owner, event type, offender, coordinates, world) is sent asynchronously; by default the address is empty and the webhook is off.

6. Funnel claim (HOPPER)

Material BARREL, CMD 920006, cube 25×25×25. Every interval-seconds: 3, the plugin collects Item entities inside the cube and puts them into its own virtual 54-slot storage — the number is hardcoded and not changeable via the config. If an item fits entirely, it disappears from the ground; if partially, the remainder that didn't fit stays; if the storage is full, the excess waits for the next tick. The storage opens as a separate window in the management GUI (available to any member, only on the HOPPER type), and closing the window saves the contents immediately. If the claim is removed — by the owner or by someone else finishing off the center — the contents spill out at the center rather than vanishing.

7. Buff claim (BUFF)

Material BEACON, CMD 920007, cube 25×25×25. Every interval-seconds: 5, the plugin walks the players in the cube and applies effects to the owner and any member — the role doesn't matter. The factory set: Strength I (STRENGTH:0), Speed II (SPEED:1), Regeneration I (REGENERATION:0), Resistance I (DAMAGE_RESISTANCE:0) — the number after the colon is the amplifier, 0 means level I, 1 means level II. The duration of each application is not exactly 5 seconds but (interval + 3) × 20 ticks, i.e. 8 seconds: the three-second buffer guarantees the effect doesn't flicker in the gap between two reapplications. The effects show no particles — only the icon in the inventory.

8. Debuff claim (DEBUFF)

Material MAGMA_BLOCK, CMD 920008, cube 25×25×25. A mirror of the buff with the opposite sign: every interval-seconds: 5 it hits everyone who is neither the owner nor a member of any role and who doesn't have privates.bypass — that is, pure guests. The factory set: Weakness I (WEAKNESS:0), Slowness II (SLOW:1), Wither I (WITHER:0) — a guest hits weaker, runs slower, and loses health from withering. The duration uses the same formula, 8 seconds. The owner and members receive nothing.

9. Ender claim (ENDER)

Material END_STONE_BRICKS, CMD 920009, cube 25×25×25. When a non-member breaks the center, a scatter fires in a sphere of radius radius: 40, three times the protective cube's 12 blocks: the effect covers neighboring buildings if the claim isn't in open country. It scatters not only the culprit but all players in the world who happen to be within 40 blocks of the center at the moment of destruction. For each one it first tries the console command from rtp-command: "rtp %player%"; if that doesn't work, its own algorithm kicks in: up to 8 attempts at a random angle and distance (20 plus a random amount up to radius blocks), finding the highest solid block by X/Z, rejecting points with lava or water underfoot, and teleporting to a block above the surface. If it fails to get a point in 8 attempts, a hard fallback applies: a shift by a fixed distance along an axis. The player flies off somewhere in any case.

Management GUI

It opens on a right-click on the center block by a trusted player (owner, member of any role, or privates.bypass) — vanilla opening of a block under a claim doesn't pass, even if it's a chest. For a guest on a visible type the GUI won't open — the type name and "Owner: X | Size: N" arrive in chat (the second line is hardcoded, not from messages). The hidden type doesn't even give that.

The 27-slot "Management" window: slot 4 is the info sheet (type, owner, size and radius, coordinates, world, member count); slots 9–17 are member heads in order of addition, a maximum of 9 on screen — if there are more members, the rest are visible via /priv members. Slot 18 (emerald) "Add member" — a click closes the window and switches to a waiting mode: the next chat message is intercepted and interpreted as a name, and "отмена"/"cancel"/an empty string cancels. Slot 20 (comparator) opens flags; slot 22 (ender pearl) teleports to the center, available to any member; slot 24 (chest) is the storage, only on HOPPER; slot 26 (barrier) removes the claim, only for the owner or bypass, with the lore "this action is irreversible": unlike /priv delete, the button removes the claim with one click, without the 15-second confirmation.

A click on a member head: left-click cycles the role in a loop "member → trusted → co-owner → member", but only the owner or an admin can raise someone to co-owner — for a plain co-owner the role quietly rolls back. Right-click removes the member entirely, and that is allowed to anyone entitled to manage, without the owner-only caveat. Flags are a separate 9-slot window: the first six are the flags themselves (lime dye means "enabled", gray means "disabled", a click toggles and saves instantly), slot 8 is the "Back" arrow. Empty cells are dimmed with gray glass, except in the member-head range — there an unoccupied slot stays empty so you can see how many places are free.

Storage, holograms, and API

Everything lives in one YAML file, privates.yml, in the plugin folder — there's no SQLite here. Each claim is one block: id, owner (uuid and name), type, world, center coordinates, size, members with roles, all six flags, and for the funnel also the storage contents via Bukkit ItemStack serialization. A record is marked "dirty" on change; autosave to disk runs every 30 seconds when there are changes and always on server shutdown; but most player actions are saved immediately. One corrupted record on load doesn't bring down the whole file — the plugin skips it with a warning in the log. Old records without a saved role get "trusted" — backward compatibility with the old behavior where "member means can build".

The hologram is an optional layer: a soft dependency on DecentHolograms. At startup the plugin writes one of three outcomes to the log: holograms are disabled in the config, DecentHolograms was not found, or it was found — with the version. A hidden claim never gets a hologram. Text and height are configured through %owner% and %type%. On server shutdown holograms are removed, and on startup they're created anew.

For external plugins there is a static class PrivatesAPI: isProtected(Location) with the alias isInsidePrivate(Location), and getOwnerAt(Location) — the uuid of the claim owner at a point, or null. A comment in the code names the consumers — CloudCommandStaff and CloudTrophyHunt, both of which call the methods through reflection, not as an ordinary compile-time dependency — so signatures can't be changed without a synchronized edit.

How to hand out claims / server scenarios

Giving is done by the command /priv give <тип> <игрок> [кол-во], available only with the privates.admin permission: the quantity is clamped to the range 1–64, the giver gets a confirmation, and the recipient a separate message that the block arrived. The plugin itself knows nothing about shops or quests — it just creates an item with the right material, CMD, and type tag; after that it's an ordinary item you can put into an event reward chest or give out by hand.

For specific server tasks, the types fit in different ways:

  • Hidden — secrets, admin zones, event stashes: gives itself away with neither a hologram nor a response to a click.
  • Explosive — a trophy room or the center of a PvP arena: breaking in costs the attacker dearly and gives no right to the loot.
  • Protected / Protected+ — public buildings at spawn that need to stand despite regular griefing attempts: the perimeter patches itself.
  • Alarm — guarding a valuable zone or VIP plot: with the webhook, intrusion alerts can be wired even into an external bot channel.
  • Funnel — an auto farm or mob grinder: drops are collected automatically, no need for a network of vanilla hoppers under every block.
  • Buff — a rally point before a raid, a safe hub, or a warm-up zone: your own get an advantage just by being inside.
  • Debuff — an anti-camper zone or a "members only" territory: an outsider can't settle inside for long.
  • Ender — a mini-game element or a trap for the curious: a 40-block scatter turns a break-in into a randomizer punishment for everyone nearby.

Commands

All management goes through the /priv command (aliases /privates, /приват) with tab-complete hints. The target is determined like this: first the claim center block in the crosshair, up to 6 blocks; if nothing is in the crosshair, the claim whose cube you're standing in; if there are several under your feet, priority goes to the one where you're the owner, otherwise the one you can manage.

CommandWhat it does
/priv infoClaim info — by the crosshair on the center or by where you're standing.
/priv add / remove <ник>Add or remove a member (default role is member).
/priv trust / untrust <ник>Grant the "trusted" role or demote back to "member".
/priv role <ник> <member|trusted|coowner>Assign a role directly; coowner only from the owner or an admin.
/priv membersList of members with roles.
/priv flag <флаг> [on|off]Without a value — show the current one; with a value — toggle.
/priv home [номер]Teleport to your claim; without a number, if there are several, a list to choose from.
/priv listList of your claims.
/priv borderHighlight the cube's borders with particles (you must be a member).
/priv setowner <ник>Transfer ownership of the claim.
/priv deleteRemove the claim (repeat within 15 seconds to confirm).
/priv give <тип> <игрок> [кол-во]Give a claim block to a player, 1–64 pcs. (privates.admin).
/priv list allAll claims on the server (privates.admin).
/priv reloadReload config.yml without a restart (privates.admin).

Examples: /priv give explosive Vitaly 3 gives three explosive claim blocks to the player Vitaly. /priv role Friend coowner makes Friend a co-owner if the executor is the owner or an admin. /priv flag pvp on enables PvP inside the cube you're looking at.

Permissions

  • privates.admin (op by default): access to /priv give, /priv reload, and /priv list all.
  • privates.bypass (op by default): full protection bypass — build, break, open anywhere, like an owner in any other claim. It also removes the "outsider" status for the other mechanics: doesn't trigger the alarm, doesn't catch the debuff.

Configuration

config.yml is read live — edits apply with the /priv reload command, without a server restart (holograms are recreated as well). Almost everything is configurable:

  • allow-overlap — whether new claims may overlap other people's cubes (no by default, checked via the chunk index);
  • hologram, hologram-height (1.6 blocks), hologram-lines — on/off, height, and text with the placeholders %owner%, %type%; never applies to a hidden claim;
  • max-members — member limit (0 means no limit; separate from the GUI head limit, which is capped by the 9 slots);
  • entry-message — "you are in <owner>'s territory": enabled, throttle-seconds (8, per player), on-exit — the exit message;
  • border — particle border highlight: particle (FLAME), duration-seconds (8), step (1.0 — the spacing between particles);
  • default-flags — global build/container/interact/pvp/mobs/explosion; a type overrides them with its own flags: block (in the factory config this is done only for "protected", as an example);
  • for each type — material, custom-model-data (920001–920009, don't change), cube size, and mechanics: power/radius/entity-damage for explosive, inner/outer-interval for protected, webhook-url/throttle-seconds for alarm, interval-seconds and effects for funnel/buff/debuff, radius/rtp-command for the ender claim;
  • regen.material — what the shell of protected claims grows back with, a shared parameter for both types (OBSIDIAN);
  • messages — all of the plugin's text with & codes; but a couple of lines such as "Owner: X | Size: N" are hardcoded in the code and can't be edited through this block.
Nine types — nine different answers to the same question from an intruder: "what happens if I poke around here". After that the config decides: how many blocks of radius, what character the perimeter has, and exactly what a guest who walks in uninvited will hear — or receive.