Skip to main content

Gadgets

Gadgets are the only cosmetics that do something when used, and the only ones that can touch the world. Because of that, the rules are enforced once in the gadget base class rather than trusted to each gadget.

Available gadgets​

IDNameItemCooldownMoves the playerWhat it does
firework_launcherFirework LauncherFirework Rocket5sNoLaunches a firework from the player's eyes with a random colour and fade, trail, and flicker. The rocket is detached, so it never carries the player upward.
paint_gunPaint GunLime Dye3sNoPaints the 3x3 patch of ground under the player in a random concrete colour for 15 seconds, then puts the original blocks back.
grappling_hookGrappling HookFishing Rod8sYesLaunches the player toward where they are looking. The upward push is capped so it cannot be used to clear a spawn wall. Resets fall distance.
balloonBalloonWhite Wool12sYesLifts the player gently upward. Fall damage is cancelled for the landing.

Each gadget is gated by edeneffects.gadget.<id>, and edeneffects.gadget.* grants them all.

The Firework Launcher gadget

The Paint Gun colouring the ground

The Grappling Hook gadget

The Balloon gadget


The gadget item​

A player picks a gadget in the menu like any other cosmetic. Once applied, the gadget's item appears in their hotbar.

  • It goes in slot gadgets.item-slot (default 2), or the first empty hotbar slot if that one is taken. A player's own item is never replaced. If the hotbar is full, the player is told once to make room and reselect the gadget.
  • Right-click the item to fire the gadget. /cosmetics use does the same.
  • The item's lore shows the gadget's cooldown, and after each use the item shows the vanilla cooldown sweep.
  • Its vanilla use is cancelled: the firework does not launch as a firework, the rod does not cast, the dye does not dye a sheep, and the wool is not placed.
  • It cannot be dropped, moved, or placed, and is not dropped on death.

The item follows the player's selection however it changes, whether from the menu, a preset, or another server. It is removed when the gadget is removed, when the player loses the gadget's permission, or in a world where gadgets are off. It is also taken away when the player quits, so this server's saved player data never holds a stale gadget, and from every online player when the plugin stops, so removing EdenEffects never leaves a working fishing rod or placeable wool behind.

The gadget item in the hotbar

Rules every gadget follows​

When a gadget is used, these checks run in order. The first one that fails stops the gadget and tells the player why.

  1. The player has the gadget's permission.
  2. The player is not vanished or in spectator mode.
  3. Gadgets are enabled on this server and in this world (cosmetics.gadgets).
  4. For the Grappling Hook and Balloon, gadgets.allow-movement is true.
  5. The gadget is off cooldown.

The cooldown is only spent once the other checks pass, so a refused use never costs one. The check and the cooldown are applied together, so two clicks in the same tick cannot both fire. Cooldowns are tracked per gadget, and players with edeneffects.admin skip them.

Blocks always come back​

Any block a gadget changes goes through one method that records the block's full previous state (including slab halves, stair facing, and so on) and schedules it to be restored. There is no way for a gadget to place a block that is not scheduled to come back.

  • Liquids, plants, and other non-solid blocks are left alone. Only solid blocks and air are painted.
  • Painting the same block twice keeps the state from before the first shot and resets the timer, so however many times a block is painted, it returns to what it was originally.
  • On a clean shutdown, every block still waiting is restored immediately.
Things to be aware of
  • Gadget blocks are placed directly, without firing a block place event, so region protection plugins such as WorldGuard do not stop the Paint Gun. The change is always temporary, but if you do not want it in a protected area, turn gadgets off in that world with cosmetics.gadgets.disabled-worlds.
  • Pending restores are held in memory. If the server crashes within 15 seconds of a paint, those blocks keep the paint colour.

Painted blocks reverting to their original state

Turning gadgets off​

GoalSetting
No gadgets on this servercosmetics.gadgets.enabled: false
No gadgets in certain worldscosmetics.gadgets.disabled-worlds: [world_name]
Keep gadgets, but no launching playersgadgets.allow-movement: false

See Configuration.