FunTraps
PluginLicenseRef-All-Rights-Reserved

FunTraps

A fun trap cage plugin for your server

52
Downloads
0
Followers
2 months ago
Updated
📦
2
Versions

📖About FunTraps

FunTraps – Customizable Cages

FunTraps adds fun and tactical traps to your server with full region and protection support.

It is a lightweight Spigot/Paper 1.21+ plugin that allows you to create custom cage and trap structures with configurable skins and potion effects, fully integrated with WorldGuard and ProtectionStones.


Description

FunTraps allows server administrators to configure customizable traps that activate on players.

Traps can take the form of cages or prisons built from custom block structures and enhanced with potion effects.

The plugin supports region protection systems and intelligent trap placement to ensure precise and fair gameplay.


Features

Core Systems

  • Selection tool (Golden Axe) to define precise trap dimensions.
  • Dynamic cage skins configurable via config.yml.
  • Multi-layer potion effect system (supports both finite and infinite durations).
  • Custom animations including Sphere and Expansion modes.

Protection & Integration

  • WorldGuard Integration
    • Restrict trap deployment in specific regions or blocked worlds.
    • Define whitelisted areas where traps are permitted.
  • ProtectionStones Integration
    • Restrict trap usage to region owners or members within protected claims.

Advanced Mechanics

  • Database Support: Toggle between FlatFile (YAML) and MySQL for network-wide data synchronization.
  • Usage & Durability: Implementation of a "Uses" system to limit how many times a player can deploy a specific trap skin.
  • Intelligent Positioning: Dynamic center calculation when saving structures based on player location.
  • Block Filtering: Prevents the replacement of sensitive blocks such as Barrier, Bedrock, or Dispensers.
  • Data Integrity: Safe restoration of container contents (chests, hoppers) and mob spawner settings.

Ideal use cases

  • Minigames where players can trap each other
  • Adventure maps with trigger-based traps
  • Survival servers that want to add a tactical gameplay element

Installation

  1. Download the latest FunTraps.jar
  2. Place it inside your server’s plugins/ folder
  3. Optionally install WorldGuard and/or ProtectionStones
  4. Start or reload your server

Configuration

All configuration files are located in: FunTraps/config.yml


Skins

You can define multiple cage skins using custom blocks, effects, sounds, and animations.

Example configuration:

# ###########################################################
#                        SKINS CONFIG                      #
# ###########################################################
skins:
  default:
    # ================================
    # BossBar for this skin only
    # ================================
    # Use {time} in the text to display the remaining time dynamically.
    bossbar:
      enabled: true
      text: "&5⏳ Trap Active! {time}s"
      color: PURPLE
    duration: 15 # Trap duration with this skin (in seconds)
    cooldown: 15 # Trap cooldown with this skin (in seconds)
    animation: sphere # Animation type: "sphere", more coming soon...

    # ================================
    # Item cooldowns inside the trap
    # ================================
    item-cooldowns:
      ENDER_PEARL: 8 # seconds
      CHORUS_FRUIT: 12
      ENCHANTED_GOLDEN_APPLE: 30
      GOLDEN_APPLE: 15
      TOTEM_OF_UNDYING: 30
      ELYTRA: 15
      # You can continue adding more items to the list.

    # ================================
    # Sounds when placing/removing
    # ================================
    sounds:
      place:
        - name: minecraft:ui.toast.challenge_complete
          volume: 1.0
          pitch: 1.0
          range: 24
          category: master
        - name: minecraft:entity.wither.break_block
          volume: 1.0
          pitch: 1.0
          range: 24
          category: master
      remove:
        - name: minecraft:block.beacon.power_select
          volume: 1.0
          pitch: 1.0
          range: 24
          category: master
        - name: minecraft:block.end_portal.spawn
          volume: 1.0
          pitch: 1.0
          range: 24
          category: master
    # ───────────────────────────────
    # Available sound categories:
    # ───────────────────────────────
    # master       → Controls all sounds globally.
    # music        → Background music.
    # record       → Music discs.
    # weather      → Rain, thunder, etc.
    # block        → Block sounds (breaking, placing, doors, pistons...).
    # hostile      → Hostile mobs (zombies, skeletons, creepers...).
    # neutral      → Passive mobs (cows, pigs, villagers...).
    # player       → Player sounds (steps, damage, burping, etc).
    # ambient      → Ambient sounds (cave sounds, nether ambiance).
    # voice        → Player voice (reserved for chat systems).

    # ================================
    # Trap Effects
    # ================================
    effects:
      # Effects applied to the trap owner
      self:
        - type: STRENGTH
          amplifier: 2
          duration: 10 # seconds
        - type: GLOWING
          amplifier: 0
          duration: -1 # Infinite until the trap ends
      # Effects applied to trapped enemies
      enemies:
        - type: SLOWNESS
          amplifier: 1
          duration: 10
        - type: GLOWING
          amplifier: 0
          duration: -1

Commands

Administrative Commands (funtraps.admin)

  • /trap give <player|all> <amount> — Distribute trap activation items.
  • /trap giveuses <player> <skin> <amount> — Add uses to a player's trap skin.
  • /trap takeuses <player> <skin> <amount> — Remove uses from a player's trap skin.
  • /trap setuses <player> <skin> <amount> — Set the exact number of uses for a player.
  • /trap profile <player> — View detailed trap statistics and usage for a player.
  • /trap tool — Obtain the selection tool for structure definition.
  • /trap save <name> — Save a new trap structure with smart center logic.
  • /trap delete <skin> — Permanently remove a saved skin.
  • /trap rename <old> <new> — Rename an existing structure.
  • /trap remove <player|all> — Forcefully remove active traps from the world.
  • /trap reload — Reload all configuration, language, and skin files.

Player Commands (funtraps.user)

  • /trap skin <name> — Select an active trap skin.
  • /trap skins — List all available skins and remaining uses.

Permissions

  • funtraps.admin — Full access to all administrative commands.
  • funtraps.user — Access to basic skin selection and listing.
  • funtraps.skin.<name> — Permission to use a specific trap skin.
  • funtraps.skin.* — Permission to use all available trap skins.

Notes

  • Trap activation items are defined in config.yml under trap.activation-item
  • The selection tool marks Position 1 and Position 2 to create structures
  • All messages are managed in lang.yml and are fully customizable

Dependencies

  • Spigot / Paper 1.21+
  • (Optional) WorldGuard
  • (Optional) ProtectionStones