TriggerVolumes icon

TriggerVolumes -----

A Spigot/Paper plugin for defining 3D trigger volumes with automated actions on player entry/exit!



TriggerVolumes Plugin

[​IMG] [​IMG] [​IMG]

A powerful Spigot/Paper plugin for creating 3D trigger volumes with customizable actions

[HR][/HR]

✨ Features

  • Selection System: Tool-based selection of cubic regions with visual feedback
  • Trigger Volumes: Store and manage named volumes with precise coordinates
  • Volume Groups: Group multiple volumes together for batch operations
  • Clone & Copy: Clone volumes with actions or copy actions between existing volumes
  • Enter/Leave Actions: Execute different actions when players enter or leave volumes
  • Action Types:
    • PLAYER_COMMAND: Execute commands as the player
    • CONSOLE_COMMAND: Execute commands from console
    • MESSAGE: Send colored messages to players
    • TELEPORT: Teleport players to specific coordinates
  • Particle Visualization: Real-time particle effects showing volume boundaries
  • Cooldown System: Prevent action spam with configurable cooldowns
  • Spatial Hashing: Optimized performance for servers with hundreds of volumes
  • Multi-Language: Support for 7 languages (EN, DE, FR, PL, RU, JA, ES)
  • Persistent Storage: Volumes and actions saved in YAML format
  • Reload Command: Update configurations without server restart

[HR][/HR]

Requirements

  • Server: Spigot or Paper 1.19+
  • Java: Version 17 or higher
  • Permissions Plugin: Optional (for permission management)

[HR][/HR]

⚙️ Installation

  1. Download TriggerVolumes-1.0.4.jar
  2. Place the file in your server's plugins/ folder
  3. Start or restart your server
  4. Configuration files will be generated automatically in plugins/TriggerVolumes/

[HR][/HR]

Commands

Basic Commands

[TABLE="width: 100%"]
Command Description Permission
/trigger tool Get the selection tool triggervolumes.admin
/trigger create <name> Create volume from selection triggervolumes.admin
/trigger delete <name> Delete a volume triggervolumes.admin
/trigger clone [source] [name] Clone volume or create from selection triggervolumes.admin
/trigger copypaste <copy> <paste> Copy actions between volumes triggervolumes.admin
/trigger list List all volumes triggervolumes.admin
/trigger info <name> Show volume details and groups triggervolumes.admin
/trigger reload Reload configurations triggervolumes.admin
[/TABLE]

Action Commands

[TABLE="width: 100%"]
Command Description
/trigger setaction <name> enter <type> <value> Add action when entering volume
/trigger setaction <name> leave <type> <value> Add action when leaving volume
/trigger clearactions <name> [enter|leave|all] Clear actions from volume
[/TABLE]

Volume Groups Commands

[TABLE="width: 100%"]
Command Description
/trigger creategroup <name> <vol1> <vol2> [...] Create volume group (min 2)
/trigger deletegroup <name> Delete group (volumes remain)
/trigger groupadd <group> <volume> Add volume to existing group
/trigger groupremove <group> <volume> Remove volume from group
/trigger setaction <group> <trigger> <type> <value> Apply action to all volumes in group
/trigger clearactions <group> [enter|leave|all] Clear actions from group
[/TABLE]

Visualization Commands

[TABLE="width: 100%"]
Command Description
/trigger visualize <name> Show volume particles (30s)
/trigger hide <name> Stop showing particles
[/TABLE]

[HR][/HR]

Action Types

1. PLAYER_COMMAND
Executes a command as if the player typed it.

Examples:
Code (Text):
/trigger setaction MyVolume enter PLAYER_COMMAND /heal
/trigger setaction MyVolume enter PLAYER_COMMAND /spawn
/trigger setaction MyVolume leave PLAYER_COMMAND /back
Note: The player must have permission to execute the command!

2. CONSOLE_COMMAND
Executes a command from the console (with OP privileges).

Examples:
Code (Text):
/trigger setaction MyVolume enter CONSOLE_COMMAND give %player% diamond 1
/trigger setaction MyVolume enter CONSOLE_COMMAND effect give %player% speed 30 1
/trigger setaction MyVolume leave CONSOLE_COMMAND clear %player%
Placeholders:
  • %player% - Player's name
  • %uuid% - Player's UUID

3. MESSAGE
Sends a colored message to the player.

Examples:
Code (Text):
/trigger setaction MyVolume enter MESSAGE &aWelcome to the safe zone!
/trigger setaction MyVolume enter MESSAGE &6You are now in the &cDanger Zone&6!
/trigger setaction MyVolume leave MESSAGE &7You left the protected area.
Color Codes:
  • &0-9, a-f - Standard Minecraft colors
  • &l - Bold, &o - Italic, &n - Underline
  • &m - Strikethrough, &k - Obfuscated
  • &r - Reset formatting

4. TELEPORT
Teleports the player to specified coordinates.

Format: x y z [yaw] [pitch]

Examples:
Code (Text):
/trigger setaction MyVolume enter TELEPORT 100 64 200
/trigger setaction MyVolume enter TELEPORT 0 70 0 90 0
/trigger setaction MyVolume leave TELEPORT -50 65 -50 180 45
[HR][/HR]

Usage Workflow

Step 1: Creating a Volume

Method A: Using the Selection Tool
Code (Text):
# Get the selection tool
/trigger tool

# Select two corners by clicking blocks
# Left-click for position 1, Right-click for position 2

# Create the volume
/trigger create MyFirstVolume
Method B: Using Coordinates
Code (Text):
/trigger define MyFirstVolume 100 60 100 150 80 150
Step 2: Adding Actions

Enter Actions (triggered on entering):
Code (Text):
/trigger setaction MyFirstVolume enter MESSAGE &aWelcome!
/trigger setaction MyFirstVolume enter CONSOLE_COMMAND give %player% diamond 1
/trigger setaction MyFirstVolume enter CONSOLE_COMMAND effect give %player% speed 30 1
Leave Actions (triggered on leaving):
Code (Text):
/trigger setaction MyFirstVolume leave MESSAGE &cGoodbye!
/trigger setaction MyFirstVolume leave CONSOLE_COMMAND effect clear %player%
/trigger setaction MyFirstVolume leave TELEPORT 0 64 0
Step 3: Testing and Visualization

Code (Text):
# Visualize the volume with particles
/trigger visualize MyFirstVolume

# Walk into and out of the volume to test

# Stop visualization
/trigger hide MyFirstVolume
[HR][/HR]

Practical Examples

Example 1: Safe Zone
Create a safe zone that heals players and prevents PvP:

Code (Text):
/trigger create SafeZone
/trigger setaction SafeZone enter MESSAGE &a&lYou entered a safe zone!
/trigger setaction SafeZone enter CONSOLE_COMMAND effect give %player% regeneration 999999 1 true
/trigger setaction SafeZone enter CONSOLE_COMMAND effect give %player% resistance 999999 4 true
/trigger setaction SafeZone leave MESSAGE &cYou left the safe zone!
/trigger setaction SafeZone leave CONSOLE_COMMAND effect clear %player%
Example 2: Shop Entrance
Display information when entering a shop:

Code (Text):
/trigger create ShopEntrance
/trigger setaction ShopEntrance enter MESSAGE &6&l=== SHOP ===
/trigger setaction ShopEntrance enter MESSAGE &eWelcome to the market!
/trigger setaction ShopEntrance enter MESSAGE &7Type /shop to browse items
/trigger setaction ShopEntrance enter PLAYER_COMMAND /shop
Example 3: Danger Zone
Warn players entering a dangerous area:

Code (Text):
/trigger create DangerZone
/trigger setaction DangerZone enter MESSAGE &c&l⚠ WARNING ⚠
/trigger setaction DangerZone enter MESSAGE &cYou entered a dangerous area!
/trigger setaction DangerZone enter MESSAGE &cProceed with caution!
/trigger setaction DangerZone leave MESSAGE &aYou are now safe.
Example 4: Teleport Hub
Create a portal that teleports players:

Code (Text):
/trigger create TeleportHub
/trigger setaction TeleportHub enter MESSAGE &6Teleporting to spawn...
/trigger setaction TeleportHub enter TELEPORT 0 64 0 0 0
Example 5: Mining Zone
Give players items when entering a mining area:

Code (Text):
/trigger create MiningZone
/trigger setaction MiningZone enter MESSAGE &6You received mining equipment!
/trigger setaction MiningZone enter CONSOLE_COMMAND give %player% iron_pickaxe 1
/trigger setaction MiningZone enter CONSOLE_COMMAND give %player% torch 16
/trigger setaction MiningZone leave MESSAGE &7Your mining equipment was removed.
/trigger setaction MiningZone leave CONSOLE_COMMAND clear %player% iron_pickaxe
/trigger setaction MiningZone leave CONSOLE_COMMAND clear %player% torch
Example 6: Cloning Volumes
Clone a volume's actions to a new area:

Code (Text):
# Select new area with the tool
/trigger tool
# Left-click and right-click to select

# Clone an existing volume to the new selection
/trigger clone SafeZone MySafeZone2
# This creates MySafeZone2 with all actions from SafeZone

# Or create a volume without actions
/trigger clone
# Creates volume_1, volume_2, etc.

# Or clone with auto-generated name
/trigger clone SafeZone
# Creates SafeZone_clone, SafeZone_clone1, etc.
Example 7: Copying Actions Between Volumes
Copy actions from one volume to another without selection:

Code (Text):
# Copy all actions from DangerZone to AnotherDangerZone
/trigger copypaste DangerZone AnotherDangerZone
# Both enter and leave actions are copied
Example 8: Volume Groups
Manage multiple volumes as a group:

Code (Text):
# Create a group of shop volumes
/trigger creategroup AllShops Shop1 Shop2 Shop3

# Add more volumes to the group later
/trigger groupadd AllShops Shop4
/trigger groupadd AllShops Shop5

# Apply actions to all volumes in the group at once
/trigger setaction AllShops enter MESSAGE &6Welcome to the shop!
/trigger setaction AllShops enter CONSOLE_COMMAND effect give %player% glowing 10
/trigger setaction AllShops leave MESSAGE &7Thanks for visiting!

# Remove a volume from the group
/trigger groupremove AllShops Shop1

# Clear actions from all volumes in group
/trigger clearactions AllShops all

# Delete the group (volumes remain intact)
/trigger deletegroup AllShops
# Note: If a group has less than 2 volumes after removal, it's automatically deleted
[HR][/HR]

Volume Groups

Volume groups allow you to manage multiple volumes as a single unit, making it easy to apply the same actions to multiple areas.

Creating Groups
Code (Text):
# Create a group with at least 2 volumes
/trigger creategroup MyGroup Volume1 Volume2 Volume3
Using Groups
Groups can be used wherever you would use a volume name:

Code (Text):
# Apply actions to all volumes in a group
/trigger setaction MyGroup enter MESSAGE &aWelcome!
/trigger setaction MyGroup leave MESSAGE &cGoodbye!

# Clear actions from all volumes in a group
/trigger clearactions MyGroup enter
/trigger clearactions MyGroup all
Managing Groups
Code (Text):
# Add a volume to an existing group
/trigger groupadd MyGroup NewVolume

# Remove a volume from a group
/trigger groupremove MyGroup OldVolume

# View which groups a volume belongs to
/trigger info Volume1
# Shows: "Groups: MyGroup, AnotherGroup"

# Delete a group (volumes are not deleted)
/trigger deletegroup MyGroup
Important Notes:
  • Groups require a minimum of 2 volumes
  • When removing a volume leaves less than 2 volumes, the group is automatically deleted
  • A volume can belong to multiple groups simultaneously
  • Removing a volume from a group doesn't delete the volume itself

Key Features
  • Batch Operations: Apply actions to multiple volumes simultaneously
  • Independent Volumes: Deleting a group doesn't delete the volumes
  • Multiple Membership: A volume can belong to multiple groups
  • Persistent: Groups are saved and loaded with the plugin

[HR][/HR]

⚡ Performance Optimization

The plugin uses spatial hashing to efficiently handle hundreds or thousands of volumes without performance impact.

How It Works
  • The world is divided into 16×16 block chunks (Minecraft's standard chunk size)
  • Each volume is registered in all chunks it overlaps
  • When checking if a player is in a volume, only volumes in the current chunk are checked

Performance Comparison
[TABLE="width: 100%"]
Number of Volumes Without Optimization With Spatial Hashing Speedup
10 volumes 10 checks 2-3 checks 3-5× faster
100 volumes 100 checks 5-8 checks 12-20× faster
1000 volumes 1000 checks 5-10 checks 100-200× faster
[/TABLE]

Benefits
  • Scalable: Handles thousands of volumes without lag
  • Efficient: O(k) instead of O(n) where k = volumes per chunk
  • Automatic: No configuration needed, works out of the box
  • Real-time: Updates instantly when volumes are created/deleted

[HR][/HR]

Permissions

Admin Permissions
  • triggervolumes.admin - Access to all commands (default: OP)
    • Create, delete, and manage volumes
    • Set and clear actions
    • Visualize volumes
    • Reload configuration

User Permissions
  • triggervolumes.use - Trigger actions when entering/leaving volumes (default: all players)

Permission Examples (LuckPerms):
Code (Text):
# Give admin permission to specific player
/lp user PlayerName permission set triggervolumes.admin true

# Give admin permission to a group
/lp group admin permission set triggervolumes.admin true

# Remove trigger permission from guest group
/lp group guest permission set triggervolumes.use false
[HR][/HR]

⚙️ Configuration

Main Configuration (config.yml)

Code (Text):
# Language Configuration
language:
  default: en  # Available: en, de, fr, pl, ru, ja, es

# Particle Settings
particles:
  update-interval: 5      # Ticks between particle updates
  density: 0.5            # Distance between particles (blocks)
  visualization-duration: 30  # Duration in seconds

# Cooldown System
cooldowns:
  enabled: true
  default-cooldown: 3     # Cooldown in seconds

# Selection Tool
selection-tool:
  material: WOODEN_HOE
  name: "&6Selection Tool"
  lore:
    - "&7Left-click: Set position 1"
    - "&7Right-click: Set position 2"
Cooldown System

The cooldown system prevents actions from being triggered too frequently when players repeatedly enter/exit volumes.

How it Works:
  • Separate Cooldowns: Enter and leave actions have independent cooldowns
  • Per-Volume: Each volume has its own cooldown timer per player
  • Configurable: Default cooldown time can be set in config.yml
  • Reloadable: Use /trigger reload to apply config changes without restart

Particle Visualization

Volumes can be visualized with colored particle effects:

Colors:
  • Green (VILLAGER_HAPPY): Volumes with actions
  • Red (REDSTONE): Volumes without actions
  • Blue (WATER_SPLASH): Currently being visualized

[HR][/HR]

Multi-Language Support

The plugin supports 7 languages:

  • en - English (Default)
  • de - Deutsch
  • fr - Français
  • pl - Polski
  • ru - Русский
  • ja - 日本語
  • es - Español

To change language:
  1. Edit config.yml
  2. Change language: default: to your desired language code
  3. Run /trigger reload

[HR][/HR]

Troubleshooting

Actions Not Triggering

Solutions:
  1. Check permissions: Player needs triggervolumes.use
  2. Verify actions exist: /trigger info <name>
  3. Check cooldown: Actions have a 3-second cooldown by default
  4. Visualize volume: /trigger visualize <name> to verify boundaries
  5. Check console for errors

Selection Tool Not Working

Solutions:
  1. Ensure you have the correct tool (default: Wooden Hoe)
  2. Check you have triggervolumes.admin permission
  3. Try getting a new tool: /trigger tool
  4. Verify you're clicking blocks, not air

Particles Not Showing

Solutions:
  1. Check your particle settings in client (Options > Video Settings > Particles)
  2. Verify the volume exists: /trigger info <name>
  3. Try standing closer to the volume
  4. Check if another volume is being visualized (only one at a time)

[HR][/HR]

Advanced Tips

Using Placeholders
All actions support these placeholders:
  • %player% - Player's name
  • %uuid% - Player's UUID

Multiple Actions
Volumes support unlimited actions per trigger type. All actions execute in the order they were added.

Overlapping Volumes
Players can be in multiple volumes simultaneously. Each volume's actions will trigger independently.

World-Specific Volumes
Volumes are world-specific. A volume in "world" won't trigger for players in "world_nether".

Backup and Migration
Simply copy the triggervolumes.yml file to backup or transfer volumes to another server.

[HR][/HR]

File Structure

Code (Text):
plugins/TriggerVolumes/
├── config.yml              # Main configuration
├── triggervolumes.yml      # Stored volumes and actions
└── lang/                   # Language files
    ├── en.yml             # English (default)
    ├── de.yml             # German
    ├── fr.yml             # French
    ├── pl.yml             # Polish
    ├── ru.yml             # Russian
    ├── ja.yml             # Japanese
    └── es.yml             # Spanish
[HR][/HR]

‍ API for Developers

Maven Dependency
Code (Text):
<dependency>
    <groupId>de.zfzfg</groupId>
    <artifactId>TriggerVolumes</artifactId>
    <version>1.0.4</version>
    <scope>provided</scope>
</dependency>
Getting the Plugin Instance
Code (Text):
TriggerVolumesPlugin plugin = (TriggerVolumesPlugin) Bukkit.getPluginManager().getPlugin("TriggerVolumes");
Checking if a Location is in a Volume
Code (Text):
TriggerVolumeManager manager = plugin.getVolumeManager();
List<TriggerVolume> volumes = manager.getVolumesAtLocation(location);

if (!volumes.isEmpty()) {
    // Location is in at least one volume
}
Creating a Volume Programmatically
Code (Text):
TriggerVolumeManager manager = plugin.getVolumeManager();
manager.createVolume("MyVolume", "world", 0, 60, 0, 100, 80, 100);

// Add actions
TriggerAction action = new TriggerAction(ActionType.MESSAGE, "&aHello!");
manager.addEnterAction("MyVolume", action);
[HR][/HR]

Support & Contributing

Reporting Bugs
When reporting bugs, please include:
  1. Server version (Spigot/Paper)
  2. Plugin version
  3. Full error message from console
  4. Steps to reproduce the issue
  5. Relevant configuration files

Feature Requests
Have an idea? Open an issue with:
  • Clear description of the feature
  • Use case / why it's needed
  • Example of how it would work

[HR][/HR]

Credits

Author: zfzfg
Version: 1.0.4
Built with: Maven, Spigot API, Java 17

Made by zfzfg

[​IMG]

For updates and more plugins, visit our GitHub repository.
Resource Information
Author:
----------
Total Downloads: 6
First Release: Dec 7, 2025
Last Update: Dec 7, 2025
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings