CloudCommandStaff: Command Staff

Right click, and the world around you stops being predictable. One swing decides who takes off into the sky today and who simply goes blind.

What it is

The Command Staff is a donation item for Paper 1.19.4 from the Cloud Delight studio. Its internal number in the lineup is TZ #54 (hence the model range for the resource pack, 54xxxx: that's how Cloud Delight numbers the whole "Staff" series). Visually it's an ordinary stick with a charge counter that's visible right in the item description. The staff works like a small roulette: a right click spends one charge and runs one of ten pre-built command-effect sets, and which one it is gets decided by chance every time. The player doesn't choose the effect or aim in advance — they just click and watch the result.

How it works

Click and set selection

Only the main hand triggers it: a swing with the staff in the off hand doesn't count and doesn't double the effect. Both kinds of right click react, in the air and on a block, and the stick stops behaving like a vanilla one. From all enabled sets, the plugin picks exactly one by weighted random choice: each set has its own weight, and the larger it is, the more often that particular set drops. Out of the box all ten weigh the same, one each, so the chance for each is exactly 1 in 10, with no favorites.

The set's commands are sent not by the player but by the console, with operator permissions and bypassing the player's own permissions, but in the player's context: "nearest", "all players", "random", and relative coordinates are calculated around the caster, as if they had typed the command themselves from root. If a coordinate depends on the look direction rather than just height, the wrapper also locks the caster's rotation, since otherwise it would be calculated from the console's direction, meaning nowhere.

Counter: lore, action bar, and staff breakdown

A charge is spent only if the set actually fired: if the world is blacklisted or no sets are enabled at all, the activation costs nothing and the player only gets a chat warning. A real charge spend is always accompanied by a popup above the hotbar showing what's left, and it also updates simply when you switch to the staff in your hotbar, even without a single swing. The remaining count is duplicated in the item description: the line with a placeholder is rewritten by the plugin on the fly every time the counter changes.

The staff is recognized by an internal tag, not by name or material. Changing the look in the config won't break staffs that were already given out: they keep their old material, and the new one goes only to staffs given out after the edit. The stick has no durability by default, so there is no declining bar on the item and the count lives in the popup and the description. A material with durability also adds a bar on the item itself.

When the charges run out, one staff breaks with a chat message. If the player held a stack of identical staffs, only one is lost: the others each have their own counter, which this loss doesn't touch.

Protecting the caster from their own staff

"Nearest player" technically includes the caster too: the distance to yourself is always zero, so without corrections the staff would first of all punish whoever holds it. The plugin fixes this on the fly: before running, a minimum distance is automatically added to every selector that picks players ("nearest", "all", "random", "any entity"), 2 blocks by default, and the caster drops out of the selection. If a distance is already set by hand, as in most sets, the correction leaves it alone; if it isn't set but other selection conditions exist, the minimum distance is simply added to them. There is one exception: a direct reference to "the caster themselves". If a set is deliberately meant to hit the owner, the correction deliberately doesn't touch it. The radius itself is not a spell but a plain number in the config: you can narrow it, widen it, or zero it out entirely.

10 command sets

There are exactly ten entries in the config, and out of the box they all have the same weight of one, so the chance for any particular set is exactly 1 in 10. Each has its own chat line after it fires and its own list of effects; what drops ranges from a harmless debuff to TNT and a Wither.

#Chat lineWhat happens
1"Everything around went blind"Blindness for 30 seconds on every living thing within 100 blocks of the caster. The screen goes dark at once for everyone around, players and mobs alike.
2"The nearest player is starving"The nearest player (2–15 blocks) gets hunger strong enough that saturation drops to zero almost instantly and stays there for all 60 seconds.
3"Everyone got launched up"Levitation for 30 seconds on every living thing within 100 blocks. The whole crowd lifts into the air at once, mobs too.
4"The nearest was thrown high up"The nearest player (2–15 blocks) is teleported straight up 100 blocks from their current spot, with no safety net, and a fall from that height is normally deadly.
5"Explosion at the nearest"The nearest player (2–15 blocks) gets level six resistance for 5 seconds and a primed TNT is placed at their feet right away. See the risk breakdown below.
6"The nearest was teleported"The most complex set of the ten and one of the riskiest. Full breakdown below.
7"The zombie horde has awakened"For every player within 1000 blocks of the caster, which is practically everyone on the server at once, a zombie materializes right at their spot, with no warning.
8"Wither summoned for 60 seconds"A Wither appears at a random player (not necessarily the nearest) within 2–15 blocks. The plugin remembers who wasn't on the map before the hit and removes exactly the new ones after 60 seconds.
9"The nearest is buffed and weakened at once"The nearest player (2–15 blocks) gets level four resistance, fire resistance, haste, speed, and regeneration for 30 seconds, and right away weakness of the same level and duration, which noticeably cuts melee damage.
10"Rage and chaos all around"The nearest player (2–15 blocks) gets level six strength, poison, and blindness for 15 seconds, while everything alive in a wider radius of 20 blocks gets slowness and mining fatigue for the same 15 seconds.

What just tickles the nerves

Sets 1, 2, 3, 9, and 10 don't kill directly. Blindness, hunger, levitation, and a mix of buffs and debuffs don't take a player to zero on their own. Unpleasant, sometimes annoying (especially hunger or weakness mid-fight), but not lethal as such.

What can really kill

Sets 4, 7, and 8 are, honestly and plainly, a real threat to life. The 100-block throw upward in set 4 comes with no fall protection: without a totem, elytra, or other protection, the trip back down is deadly for the player. The horde in set 7 materializes suddenly and point-blank at every player on the server. For someone without armor and with no weapon in hand, that is a real fight with no warning. And the Wither from set 8, though it lives only 60 seconds, manages in that time both to throw skulls and to deal solid damage up close, more than enough to kill an unprepared player. The throw from set 6 honestly belongs on this list too, with a separate nuance, broken down just below.

Set 5 — spectacular, but not deadly

It looks the scariest: TNT point-blank. In practice it's an almost safe trick. Level six resistance for 5 seconds is applied before the TNT, and the standard fuse of a primed TNT block is about 4 seconds, so the blast catches the victim still protected: there is almost no actual damage, but the shockwave flings them around dramatically, since resistance cancels damage but not knockback. The most "stage prop" explosion of the ten.

Set 6 — the most intricate

Three actions in a row. First, the nearest player is teleported far in the direction the caster was looking at that moment. The destination is set by the staff owner's gaze, not the victim's, and the landing spot is luck of the draw: water, rocks, or the void. Then a 5×5×5 cube of air is cleared around the caster (not around the teleported player). It's the only block clearing among the ten, and it is the one that carries a forced claim and WorldGuard check (details in the next section): in a protected spot the clearing is quietly skipped, and the teleport still goes through. The third command again picks the player nearest to the caster within 2–15 blocks and gives them slow falling. The problem is that it's usually no longer the one who was teleported: after such a throw the victim ends up far outside that radius, the safety net goes to a random neighbor of the caster, and the one who flew away falls without it. Despite the "teleport plus soft landing" idea, in practice this is one of the riskiest sets of the ten, not the politest.

The weights, chat lines, and commands of every set are config, not hardcoded: if the balance doesn't suit you, you edit a text file instead of rebuilding the plugin.

Protecting other people's builds: WorldGuard and CloudPrivates

The staff's commands come from the console, which bypasses ordinary player permissions, and without a separate check this would turn spawn or someone's claim into a sieve. That's why the most destructive commands, by default block filling, block placing, and mob summoning, get a separate check at the spot where the staff owner stands at the moment of the hit, not where the teleported player is or where a zombie was summoned a thousand blocks away. If building is not allowed there by a WorldGuard region, or it is someone's CloudPrivates claim, that specific command of the set is quietly skipped, while the other, harmless effects of the same set still run in full. The practical conclusion: the protection insures the spot where the user stands, not the bases of random players that the horde or the Wither reaches. Those are covered by their own protections, not by the staff.

Both integrations are soft dependencies: the plugin doesn't pull in WorldGuard or CloudPrivates, and detects them through class reflection if they are actually installed on the server. No plugin, no check getting in the way. If the plugin is there but the version is unfamiliar and the expected methods aren't found, the two integrations behave differently: CloudPrivates is treated conservatively, so the spot is assumed private just in case and destructive actions are blocked, while WorldGuard, on the contrary, simply stops taking part in the check and blocks nothing. The asymmetry is deliberate: better to overdo it once with someone's claim than to underdo it with a region. And the admin will see a warning in the console at startup about the incompatibility anyway.

The list of dangerous commands, both toggles for respecting protections, and the list of worlds where the staff is fully disabled are all in the config. Set 6 also has its own forced check: it keeps the check on for its air clearing even if both general toggles are someday turned off for performance on the other sets.

Balance and presentation: how to sell the staff

The point of the staff is not power but unpredictability: of the ten outcomes, only set 5 can be called relatively safe, and the rest are set up to go big one way or another. It's best sold as a roulette and a source of stories in chat, not as an upgrade. Comparing it with armor or leveling is out of place here, but selling it as an attraction fits.

  • The weight of each set is the main balance lever: raise the chance of harmless sets and tone down the explosive ones for a calm server, or the reverse, with the focus on the horde, TNT, and the Wither for hardcore PvP, without touching the other nine entries or the item's look.
  • default-uses is the size of a batch when given out without an explicit number. It makes sense to keep different amounts for different donation tiers, and for one-off rewards and events you can always pass the exact number of charges right in the give command.
  • Item material is a matter of presentation, not mechanics: a modest stick with no visible bar keeps the intrigue, while a material with durability gives a clear declining bar right on the item. Changing the material in the config doesn't touch staffs already given out, only those given out after the edit.
  • Safety mechanisms — the list of dangerous commands, excluded worlds, and the safeguard against hitting yourself — take away the need for the admin to handle every complaint personally: the staff is designed not to ruin spawn and other people's claims without manual control.
  • Live reconfiguration. Edits to weights and sets are picked up with a command, no server restart needed, so you can keep tuning the balance while watching players, right after the first reactions.

Commands

/cstaff give <player> [activations] gives the staff to an online player. Without the third argument, the charge count is taken from default-uses in the config; with an explicit number, that number is used. For example, /cstaff give Виталий gives a staff with the default charges, and /cstaff give Виталий 25 gives exactly 25 activations. If there is no room in the inventory, the staff drops at the player's feet instead of being silently lost. /cstaff reload re-reads the config on the fly, without a server restart. Both commands support tab completion: after give, online player names are suggested, and in place of the activation count, typical values. The aliases /commandstaff and the Cyrillic /посох work too.

Permissions

Just one permission, commandstaff.admin (operators have it by default). It's needed only for giving out the staff and reloading the config through /cstaff; without it the command refuses with a no-permission message. Using the staff itself requires no permission at all: whoever is handed it can activate it, regardless of their permissions in general.

Configuration

The material, name, resource pack model number, and description text with the remaining-charges placeholder are set in the config. The staff is recognized by an internal tag, not by material or name, so changing its look won't break anything for staffs already given out.

  • The default number of charges when given out without an explicit amount.
  • The radius of the caster's self-protection from their own selectors. You can narrow it, widen it, or zero it out.
  • The list of "dangerous" commands, separate toggles for respecting WorldGuard and CloudPrivates, and a forced check at the level of a specific set.
  • The list of worlds where the staff doesn't work at all. Activation in them costs nothing.
  • All in-game messages, from "out of charges" and "no sets enabled" to the counter popup above the hotbar and the text for blocked worlds.
  • The ten sets themselves: commands, chat line, weight, enabled or not. Everything is rewritable; the special fields fill-check and wither-lifetime-seconds are added to any set simply by being present. The config already contains a disabled template example of an eleventh set with an explanation of each field.

Edits are applied with the /cstaff reload command, with no server restart. The config also has a separate license block: an online key check with a grace period in case the license server is unavailable; for a private server, the protection is switched off with a single flag.

Ten sets are not ten buttons to choose from. They are ten reasons to keep your hand on the staff and not know in advance what happens next.