promotional bannermobile promotional banner
premium banner
🛡️ Protect builds, control PvP/PvE combat, NPC spawn, fall damage, difficulty (damage and stamina) and override permissions with granular protections. Set custom enter/leave titles, multi-tier permissions. Perfect for spawns, arenas, and private zones!

Description

Protect Area v0.8.2

Protect your builds, control combat, and customize your world zones with powerful cuboid protection! Create multiple protected areas with granular control over block protection, PvP/PvE/EvP settings, fall damage, mob spawns, and custom enter/leave messages. Perfect for spawn protection, safe zones, PvP arenas, or any area where you need precise control over player interactions.

Features

  • ⚔️ PvP/PvE/EvP Protection
  • 🎬 Title Notifications
  • 🎯 Granular Block Protection
  • 🔢 Advanced Difficulty (Damage & Stamina) Modifiers
  • 🛡️ Multi-Area Protection
  • 🗺️ Multi-Region Areas
  • 👥 Flexible Ownership
  • ⚙️ Granular Protection Flags
  • 🌍 Global Areas
  • 👁️ Visual Feedback
  • 🔐 Permission Overrides
  • 💬 Custom Messages
  • 🔔 Notification Preferences
  • ⚔️ Combat Protection
  • 🎯 Entity Scope Control
  • 💾 Persistent Storage
  • 🛡️ Comprehensive NPC Spawn Protection
  • 🎮 Manual NPC Removal
  • 📊 Area Priority for Overlaps


Join us on Discord

Showcase

Titles:

Selecting the region to be added to an area:

After protecting some areas:

Showing a protected area:

Multiple regions area:

Regions example with arena (blue) on the center and the spawn (orange) surrounding it. You can create the two areas and add the regions to them.

⚠️ NOTICE

MOB SPAWN PROTECTION

The new mob spawn protection feature might leave some unresponsive mobs, we are working on a fix. Also, its better if you regenerate the world, as mobs saved in the chunk can show this behavior until the chunk is saved without the mobs being in the area. This doesn't affect the gameplay.

PERMISSION ISSUES

I fixed a compatibility issue with permission-changing plugins. The permission provider now gracefully handles group operations that it doesn't support, preventing crashes when used alongside other permission plugins. A more robust permission system detection and configuration system is planned for a future update.

⚠️ WARNING: SNAPSHOT VERSION

This plugin is currently in SNAPSHOT version. Features may be incomplete, unstable, or subject to breaking changes. Use at your own risk. Things may break between versions, and data loss or corruption is possible.

Installation

Copy the jar file to the mods folder of your server, restart and enjoy!

TLDR; My first area

  • /op self - To be able to use the /pos1 and /pos2 commands for selection (or allow using permissions)
  • /gamemode creative - To fly and use the creative tools :)
  • Use /protect area create <area-name> to create a protected area (starts with no regions)
  • Go to one of the corners of the place you want to protect and mark it with /pos1
  • Go to the completely opposite corner of the area to be protected and mark it with /pos2
  • Use /expand, /contractselection, /protect expand, /deselect to adjust/redo the selection if needed
  • Use /protect addregion <area-name> to add the selection as a region to the area
  • Repeat the selection and addregion steps to add more regions to the same area

TLDR; Usage

Quick Start:

  1. Create area: /protect area create MyArea (creates empty area with no regions)
  2. Select region with /pos1 and /pos2, then add it: /protect addregion MyArea
  3. Enable protection: /protect blocks MyArea break true
  4. Configure combat: /protect combat MyArea pvp true and /protect combat MyArea falldamage true
  5. Add owners: /protect addowner MyArea PlayerName

Common Commands:

  • /protect area create <name> - Create area (no regions initially)
  • /protect addregion <name> - Add region from current selection
  • /protect removeregion <name> - Remove region containing your position
  • /protect blocks <name> break true - Enable block protection
  • /protect combat <name> pvp true - Enable PvP protection
  • /protect message enter <name> "Welcome!" - Set enter message
  • /protect notification <chat|notification> - Set notification preference
  • /protect removenpcs <name> - Remove all NPCs from an area
  • /protect area list - List your areas
  • /protect info <name> - View area details

Quick Examples:

# Protect a base with single region
/protect area create MyBase
/pos1 100 64 200
/pos2 150 80 250
/protect addregion MyBase
/protect blocks MyBase break true
/protect blocks MyBase buildertools true

# Create multi-region area
/protect area create MyComplexBase
/pos1 100 64 200
/pos2 150 80 250
/protect addregion MyComplexBase
/pos1 200 64 200
/pos2 250 80 250
/protect addregion MyComplexBase

# Create safe spawn zone (global)
/protect area create Spawn --global
/protect combat Spawn pvp true
/protect combat Spawn falldamage true
/protect combat Spawn allmobspawn true
/protect message enter Spawn "Welcome to Spawn!"

Admin Bypass

Players are considered admins and automatically bypass all protection checks if they meet any of the following criteria:

  • They are members of the OP group (experimental)
  • They have the * permission (wildcard permission) directly assigned
  • They are in any group (from any permission provider, such as LuckPerms) that has the * permission assigned (experimental)

Admin players automatically bypass all protection checks, which means:

  • They can modify blocks in any protected area
  • They can use all commands regardless of ownership
  • They can delete any protected area
  • They are not affected by PvP/PvE/EvP protection
  • They are not affected by damage/stamina modifiers

Note: The plugin queries all permission providers to check group permissions, ensuring compatibility with permission management systems (experimental)

Usage

/protect area create <area-name> [--global] [--priority <0-100>]

Creates a new protected area with no regions initially. The area will be created with no protection enabled by default. Use /protect addregion <areaname> to add regions, then configure protection settings, owners, messages, and scope using the subcommands below.

  • --global: Create a world-wide area that applies to the entire world (no regions needed)
  • --priority: Set the priority when areas overlap (0-100, default 0). Higher priority takes precedence when multiple areas overlap at the same position

Default behavior:

  • No regions (use /protect addregion <areaname> to add regions)
  • No protection flags enabled (area starts clean)
  • Entity scope: players (players only)
  • Priority: 0 (lowest priority - use --priority to set higher priority for overlapping areas)
  • No owners (use /protect addowner <areaname> <player> to add owners)
  • No enter/leave messages (use /protect message enter <areaname> <text> to set messages)

Examples:

# Create area (no regions yet)
/protect area create MyBase

# Add first region from selection - /pos command uses your position if you dont use any arguments
/pos1 100 64 200
/pos2 150 80 250
/protect addregion MyBase

# Add additional regions to the same area - /pos command uses your position if you dont use any arguments
/pos1 200 64 200
/pos2 250 80 250
/protect addregion MyBase

# Create global area (no regions needed)
/protect area create SpawnZone --global

# Create area with high priority (takes precedence when overlapping)
/protect area create VIPZone --priority 100

# Create area with custom priority
/protect area create ImportantArea --priority 75

# Then configure the area using subcommands:
/protect blocks MyBase break true
/protect blocks MyBase buildertools true
/protect blocks MyBase use true
/protect combat SpawnZone pvp true
/protect combat SpawnZone falldamage true
/protect combat SpawnZone allmobspawn true
/protect message enter SpawnZone "Welcome to Spawn!"
/protect message leave SpawnZone "You left the safe zone"
/protect mode SpawnZone all
/protect addowner MyBase PlayerName

/protect addregion <area-name>

Adds a region to a protected area from your current builder tool selection. Regions cannot overlap with existing regions in the same area.

  • Requires an active selection created with /pos1 and /pos2
  • Checks for overlaps with existing regions and prevents adding overlapping regions
  • The selection must be valid (corners must be different)

Examples:

# Create area and add first region
/protect area create MyBase - /pos command uses your position if you dont use any arguments
/pos1 100 64 200
/pos2 150 80 250
/protect addregion MyBase

# Add more regions to create complex protected zones - /pos command uses your position if you dont use any arguments
/pos1 200 64 200
/pos2 250 80 250
/protect addregion MyBase

/protect removeregion <area-name>

Removes the region containing your current position from a protected area.

  • Finds the region containing your position and removes it
  • Warns if removing the last region (non-global areas with no regions won't protect anything)
  • You must be inside a region of the area to remove it

Examples:

# Remove the region you're currently standing in
/protect removeregion MyBase

/protect area list

Lists the names of protected areas you have access to (as owner or trusted), or all areas if you're an admin.

/protect area delete <area-name>

Delete an area. Only admins can delete areas.

/protect rename <area-name> <new-name>

Rename a protected area. Only owners can rename areas. Admins bypass ownership requirements.

  • The new name must be unique within the same world
  • Cannot rename to the same name
  • Area ID remains unchanged after renaming

Examples:

# Rename an area
/protect rename MyBase MyNewBase

# Rename a global area
/protect rename OldSpawn NewSpawn

/protect priority <area-name> <0-100>

Set the priority of a protected area. When multiple areas overlap at the same position, the area with the highest priority (0-100) takes precedence. Only owners and admins can change priority.

  • Priority value: Must be between 0 and 100 (inclusive)
  • Higher priority wins: When areas overlap, the area with the highest priority value applies its protection rules
  • Default priority: New areas default to priority 0 (lowest)
  • Same priority: If multiple areas have the same priority, the first one found is used (deterministic but not configurable)

Use Cases:

  • Spawn protection: Set spawn areas to priority 100 to ensure they always take precedence
  • VIP zones: Set VIP areas to high priority (e.g., 80-90) so they override regular areas
  • Nested areas: Create a large area with priority 10, then smaller specific areas inside with priority 50 - the smaller areas will take precedence in the overlap zone
  • Arena zones: Set PvP arenas to priority 30, regular areas to 0 - arenas will override regular protection in overlap zones

Examples:

# Set spawn area to highest priority (always wins)
/protect priority SpawnZone 100

# Set VIP area to high priority
/protect priority VIPZone 90

# Set regular area to default/low priority
/protect priority MyBase 0

# Set arena to medium priority (overrides regular areas but not VIP)
/protect priority PvPArena 50

# Check current priority
/protect info MyArea
# Shows: Priority: 50 (0-100, higher = takes precedence when overlapping)

Priority Resolution:

When multiple areas overlap at a position:

  1. The system finds all areas that contain the position
  2. It selects the area with the highest priority value
  3. If multiple areas have the same priority, the first one found is used
  4. Global areas are included in the priority comparison (they don't automatically win unless they have higher priority)

/protect info <areaname>

Get detailed information about a protected area (owners, world, priority, regions, volume, protection mode, flags, trusted players, messages). For multi-region areas, shows all regions with their individual corners and volumes.

The info command displays the area's priority value, which shows how it compares to other areas when overlapping.

/protect show <areaname>

Displays all regions of a protected area visually. All regions are shown simultaneously with individual cuboid visualizations. Owners, trusted players, and admins can view areas.

Auto-Hide Timer:

  • The visualization automatically hides after a configurable duration (default: 60 seconds)
  • Configure the duration by editing protected-areas-config.json in your universe directory and setting autoShowDurationSeconds (set to 0 to disable auto-hide)
  • When adding a region with /protect addregion <areaname>, all regions are automatically shown for the configured duration
  • Run the command again with the same area name to manually hide the display before the timer expires

Visualization Refresh:

  • When regions are added or removed, the visualization automatically refreshes for all players currently viewing the area
  • This ensures the display always shows the current state of the area's regions

/protect addtrust <areaname> <player-name>

Add a trusted player to an area you own. Trusted players can modify blocks in the area. Admins bypass ownership requirements.

/protect removetrust <areaname> <player-name>

Remove a trusted player from an area you own. Admins bypass ownership requirements.

/protect addowner <areaname> <player-name>

Add an owner to an area you own. Owners can modify the area settings and manage trusted players. Admins bypass ownership requirements.

/protect removeowner <areaname> <player-name>

Remove an owner from an area you own. Cannot remove the last owner (an area must have at least one owner). Admins bypass ownership requirements.

/protect combat <areaname> <flag> <true|false>

Modify combat protection settings for a protected area. Set one flag at a time.

  • flag: One of: pvp, pve, evp, falldamage, allmobspawn, hostilemobspawn, neutralmobspawn, friendlymobspawn
  • value: true, false, 1, 0, yes, no, on, or off

Flags:

  • pvp: Enable/disable player-vs-player damage protection (no PvP damage is dealt to players in the area)
  • pve: Enable/disable player-vs-environment damage protection (prevents players from attacking entities/NPCs)
  • evp: Enable/disable environment-vs-player damage protection (prevents entities/NPCs from attacking players)
  • falldamage: Enable/disable fall damage protection (prevents fall damage for entities in the area)
  • allmobspawn: Enable/disable all mob/NPC spawn protection (blocks all NPCs - most efficient option)
  • hostilemobspawn: Enable/disable hostile mob/NPC spawn protection (blocks only hostile NPCs)
  • neutralmobspawn: Enable/disable neutral mob/NPC spawn protection (blocks only neutral NPCs)
  • friendlymobspawn: Enable/disable friendly mob/NPC spawn protection (blocks only friendly NPCs)

Note: When allmobspawn is enabled, it blocks all NPCs and specific mob spawn flags are ignored. You cannot enable both allmobspawn and specific flags at the same time.

Examples:

# Enable PvP and EvP protection, disable PvE (players can't attack NPCs, but NPCs can't attack players)
/protect combat SpawnZone pvp true
/protect combat SpawnZone pve false
/protect combat SpawnZone evp true
/protect combat SpawnZone falldamage true

# Global safe zone with fall damage and all mob spawn protection
/protect combat SafeZone falldamage true
/protect combat SafeZone allmobspawn true

# Block only hostile mobs, allow friendly NPCs
/protect combat HostileFree hostilemobspawn true
/protect combat HostileFree friendlymobspawn false

# Disable PvP but enable fall damage and all mob spawn
/protect combat MyArea pvp false
/protect combat MyArea falldamage true
/protect combat MyArea allmobspawn true

# Granular mob control: block hostile and neutral, allow friendly
/protect combat MixedZone hostilemobspawn true
/protect combat MixedZone neutralmobspawn true
/protect combat MixedZone friendlymobspawn false

# Global zone blocking all NPCs
/protect combat NoMobsZone allmobspawn true

/protect blocks <areaname> <flag> <true|false>

Modify block protection settings for a protected area. Set one flag at a time.

  • flag: One of: break, buildertools, use
  • value: true, false, 1, 0, yes, no, on, or off

Flags:

  • break: Enable/disable block place/break/damage protection
  • buildertools: Enable/disable builder tool protection
  • use: Enable/disable full block interaction protection

Examples:

# Create area first, then enable block protection
/protect area create MyBase
/protect blocks MyBase break true
/protect blocks MyBase buildertools true
/protect blocks MyBase use true

# Allow builder tools but protect regular blocks
/protect blocks SafeZone break true
/protect blocks SafeZone buildertools false
/protect blocks SafeZone use true

# Disable all block protection (allow building)
/protect blocks BuildZone break false
/protect blocks BuildZone buildertools false
/protect blocks BuildZone use false

# Protect blocks but allow interactions
/protect blocks ProtectedZone break true
/protect blocks ProtectedZone use false

/protect message enter <areaname> <text>

Set the enter message for a protected area. Use empty string to clear the message.

Examples:

# Set welcome message
/protect area create SpawnZone --global
/protect message enter SpawnZone "Welcome to Spawn!"

# Set enter message for an area
/protect message enter MyArea "Entering protected area"

# Clear the enter message
/protect message enter MyArea ""

/protect message leave <areaname> <text>

Set the leave message for a protected area. Use empty string to clear the message.

Examples:

# Set leave message
/protect message leave SpawnZone "You left the safe zone"

# Clear the leave message
/protect message leave MyArea ""

/protect message block <areaname> <text>

Set a custom block protection message for a protected area. This message is shown when players try to break/place blocks. Use reset or empty string to clear.

Examples:

# Set custom block protection message
/protect message block MyArea "You cannot modify blocks in this area!"

# Clear the custom message (use default)
/protect message block MyArea reset

/protect message combat <areaname> <text>

Set a custom combat protection message for a protected area. This message is shown when combat is prevented. Use reset or empty string to clear.

Examples:

# Set custom combat protection message
/protect message combat SafeZone "PvP is disabled in this area!"

# Clear the custom message (use default)
/protect message combat SafeZone reset

/protect message title <areaname> <enter|leave> <message> [--icon <icon-id>] [--major] [--duration <seconds>] [--fadein <seconds>] [--fadeout <seconds>]

Set title messages that display as visual overlays when players enter or leave protected areas. Titles work independently from chat messages - you can use both, either, or neither.

  • areaname: Name of the protected area
  • enter|leave: Whether this title shows when entering or leaving the area
  • message: Title message text (use empty string "" to clear)
  • --icon: Optional icon identifier for the title
  • --major: Mark title as major (larger, more prominent display)
  • --duration: How long the title stays visible in seconds (default: 4.0)
  • --fadein: Fade-in duration in seconds (default: 1.5)
  • --fadeout: Fade-out duration in seconds (default: 1.5)

Note: Title settings (icon, major flag, durations) apply to both enter and leave titles for the area. If you want different settings for enter vs leave, you'll need to set them separately.

Examples:

# Basic title for entering an area
/protect message title SpawnZone enter "Welcome to Spawn!"

# Title with icon and major flag for important areas
/protect message title Arena enter "Entering Arena" --icon "arena_icon" --major

# Title with custom duration and fade effects
/protect message title ImportantArea enter "Welcome!" --duration 8.0 --fadein 2.0 --fadeout 2.0

# Leave title with icon
/protect message title SpawnZone leave "You left the safe zone" --icon "spawn_icon"

# Clear a title message
/protect message title MyArea enter ""

# Full example: Spawn zone with both chat and title messages
/protect area create Spawn --global
/protect message enter Spawn "Welcome to Spawn!"
/protect message leave Spawn "You left spawn"
/protect message title Spawn enter "Welcome to Spawn!" --icon "spawn_icon" --major
/protect message title Spawn leave "You left spawn" --icon "spawn_icon"

/protect mode <areaname> <players|all>

Set the protection mode for a protected area.

  • players: Protect from players only
  • all: Protect from all entities (except admins)

Examples:

# Set mode to protect from all entities
/protect mode MyBase all

# Change mode to players only
/protect mode SafeZone players

/protect publicperms add <areaname> <perm1,perm2,...>

Add public permissions to a protected area. Public permissions apply to anyone inside the area, regardless of ownership or trusted status.

Examples:

# Grant builder tools permission to anyone in a build area
/protect publicperms add BuildArea hytale.editor.builderTools

# Add multiple permissions (comma-separated)
/protect publicperms add CreativeZone hytale.editor.builderTools,hytale.editor.fly

/protect publicperms remove <areaname> <perm1,perm2,...>

Remove public permissions from a protected area.

Examples:

# Remove PvP permission from anyone in a safe zone
/protect publicperms remove SafeZone hytale.combat.pvp

/protect publicperms list <areaname>

List current public permission overrides for a protected area.

Example:

/protect publicperms list MyArea

/protect publicperms clear <areaname>

Clear all public permission overrides from a protected area.

Example:

/protect publicperms clear MyArea

/protect trustedperms add <areaname> <perm1,perm2,...>

Add trusted permissions to a protected area. Trusted permissions apply only to owners and trusted players inside the area.

Examples:

# Grant special permissions to owners/trusted in an area
/protect trustedperms add AdminArea hytale.editor.builderTools,hytale.editor.fly

/protect trustedperms remove <areaname> <perm1,perm2,...>

Remove trusted permissions from a protected area.

Examples:

# Remove a permission from owners/trusted (even if public allows it)
/protect trustedperms remove RestrictedArea hytale.combat.pvp

/protect trustedperms list <areaname>

List current trusted permission overrides for a protected area.

Example:

/protect trustedperms list MyArea

/protect trustedperms clear <areaname>

Clear all trusted permission overrides from a protected area.

Example:

/protect trustedperms clear MyArea

Permission Override Details:

Public permissions apply to anyone inside the area, regardless of ownership or trusted status. Trusted permissions apply only to owners and trusted players inside the area. These take precedence over public permissions for owners/trusted players.

Layered Permission Model:

  • Base Layer: Permissions from other providers (LuckPerms, Hytale's PermissionsModule, etc.)
  • Area Layer: Area permissions that modify the base layer
    • Additions: Work additively - added alongside base layer permissions
    • Removals: Work as filters - remove permissions from the base layer

Precedence Rules:

  • For regular players: Only public permissions apply
  • For owners/trusted players: Trusted permissions are checked first, then public permissions if not found in trusted
  • Within each level: If a permission appears in both additions and removals, removals take precedence
  • Cross-level: If a permission is negated at public level but permitted at trusted level, trusted takes precedence for owners/trusted
  • Base layer integration: All area permissions work with the base layer from other providers
  • OPs: Bypass all checks (have all permissions by default)

Note:

  • Permission overrides are temporary and only apply while players are inside the area
  • Additions work alongside other providers - they don't replace base layer permissions
  • Removals filter out permissions from the base layer
  • Admins (OP/wildcard) bypass all permission checks including overrides

Example: Public removes PvP, but trusted allows it for owners

/protect publicperms remove SafeZone hytale.combat.pvp
/protect trustedperms add SafeZone hytale.combat.pvp
# Result: Regular players can't PvP, but owners/trusted can

/protect notification <chat|notification>

Set your global preference for how protection violation messages are displayed.

  • chat: Protection messages appear in chat (default)
  • notification: Protection messages appear as notifications (like block break notifications)

This preference applies to all protection violation messages (block break, place, damage, use, and combat protection). The preference is stored per-player and persists across server restarts.

Examples:

# Use chat messages for protection alerts (default)
/protect notification chat

# Use notifications for protection alerts
/protect notification notification

/protect expand

Expands the current builder tool selection vertically from Y: 0 to 319 (full world height). Requires an active selection created with /pos1 and /pos2. Useful for quickly creating full-height protected areas.

Example:

/pos1 100 64 200
/pos2 150 80 250
/protect expand  (expands selection to Y: 0-319)
/protect area create MyTower

/protect removenpcs <areaname>

Removes all NPCs from a protected area and marks overlapping chunks as unspawnable to prevent respawn. Only owners and admins can use this command.

This command performs two operations:

  1. Marks chunks as unspawnable: All chunks that overlap with the protected area are marked to prevent new spawn jobs from being created
  2. Removes existing NPCs: All NPCs currently in the protected area are removed

This is useful when:

  • You've just enabled mob spawn protection on an area that already had NPCs
  • NPCs were loaded from save files when chunks loaded
  • You want to manually clean up NPCs from a protected area

Note: The command only works in the current world. If the area is in a different world, you'll need to run the command from that world.

Examples:

# Remove all NPCs from a protected area
/protect removenpcs MyBase

# Remove NPCs from a global area
/protect removenpcs SpawnZone

Creative Mode Support

The plugin works seamlessly with creative mode, but creative mode players are subject to the same protection rules as survival players. Creative mode does not automatically bypass protections.

Important Caveats

⚠️ Creative mode does NOT bypass protections: Players in creative mode must still be configured as admins, owners, or trusted players to modify blocks in protected areas.

⚠️ Protection checks are independent: The plugin checks admin/owner/trusted status and protection flags, not game mode. A creative mode player without proper permissions will be blocked just like a survival player.

Recommended Configurations

Option 1: Area Ownership/Trust (Recommended for Builders)

For collaborative builds where creative players need access to specific areas:

# Add creative player as owner
/protect addowner <area-name> <player-name>

# OR add as trusted player
/protect addtrust <area-name> <player-name>

# Now they can modify blocks in that specific area

Best for: Collaborative builds, team projects, specific protected zones, builders working on designated areas

Option 2: Disable Protections for Build Zones

Create areas where creative players can build freely:

# Create a creative build zone
/protect area create CreativeBuildZone
/pos1 <corner1>
/pos2 <corner2>
/protect addregion CreativeBuildZone

# Disable all block protections
/protect blocks CreativeBuildZone break false
/protect blocks CreativeBuildZone buildertools false
/protect blocks CreativeBuildZone use false

# Optionally grant creative permissions (builder tools, fly)
/protect publicperms add CreativeBuildZone hytale.editor.builderTools,hytale.editor.fly

Best for: Public build zones, creative servers, unrestricted areas, designated build spaces

Option 3: Permission Overrides (Limited)

Grant creative permissions but note that protection checks still apply:

# Grant builder tools and fly permissions
/protect publicperms add <area-name> hytale.editor.builderTools,hytale.editor.fly

Note: This grants the permissions to use builder tools and fly, but players still cannot modify blocks unless they're admin/owner/trusted. Protection checks are separate from permission grants.

Best for: Granting creative features (fly, builder tools) without allowing block modifications

Option 4: Admin Access (Server Administrators Only)

⚠️ Warning: OP access grants full server control and bypasses ALL protections. Only grant to trusted server administrators, not regular builders.

# Make player an admin (bypasses all protections)
/op <player-name>
# OR
/permission add <player-name> *

# Now they can:
# - Use creative mode freely
# - Build anywhere including protected areas
# - Bypass all protection checks automatically

Best for: Server administrators only - not recommended for regular builders

Example: Setting Up a Creative Build Server

# 1. Create protected spawn area (survival players protected)
/protect area create Spawn --global
/protect combat Spawn pvp true
/protect combat Spawn falldamage true
/protect blocks Spawn break true
/protect blocks Spawn buildertools true
/protect blocks Spawn use true

# 2. Create creative build zone (anyone can build)
/protect area create CreativeZone
/pos1 1000 64 1000
/pos2 2000 200 2000
/protect addregion CreativeZone
/protect blocks CreativeZone break false
/protect blocks CreativeZone buildertools false
/protect blocks CreativeZone use false
/protect publicperms add CreativeZone hytale.editor.builderTools,hytale.editor.fly

# 3. Add builders as owners/trusted for specific project areas
/protect area create ProjectArea
/pos1 500 64 500
/pos2 800 200 800
/protect addregion ProjectArea
/protect blocks ProjectArea break true
/protect blocks ProjectArea buildertools true
/protect blocks ProjectArea use true
/protect addowner ProjectArea Builder1
/protect addtrust ProjectArea Builder2
/protect addtrust ProjectArea Builder3

Summary

  • ✅ Creative mode works with the plugin
  • ✅ Creative players follow the same protection rules as survival players
  • Recommended: Use area ownership/trust or disable protections for build zones instead of granting OP access
  • ✅ To allow building, configure players as owners/trusted, or disable protections for specific areas
  • ⚠️ Creative mode alone does not bypass protections
  • ⚠️ Permission overrides grant features but don't bypass protection checks
  • ⚠️ OP access should be reserved for server administrators only, not regular builders

Permissions

The plugin uses Hytale's permission system to control access to commands. All permissions follow the pattern protectarea.command.protect.<subcommand>.

Command Permissions

  • protectarea.command.protect - Base permission for all /protect commands. Players need this to use any protect command.
  • protectarea.command.protect.area.create - Permission to create protected areas
  • protectarea.command.protect.area.list - Permission to list protected areas
  • protectarea.command.protect.area.delete - Permission to delete protected areas (admins only by default)
  • protectarea.command.protect.rename - Permission to rename protected areas
  • protectarea.command.protect.info - Permission to view detailed information about protected areas
  • protectarea.command.protect.show - Permission to visually display protected area boundaries
  • protectarea.command.protect.addtrust - Permission to add trusted players to areas
  • protectarea.command.protect.removetrust - Permission to remove trusted players from areas
  • protectarea.command.protect.addowner - Permission to add owners to areas
  • protectarea.command.protect.removeowner - Permission to remove owners from areas
  • protectarea.command.protect.blocks - Permission to modify block protection settings
  • protectarea.command.protect.combat - Permission to modify combat protection settings
  • protectarea.command.protect.message - Permission to modify enter/leave messages
  • protectarea.command.protect.mode - Permission to modify protection mode
  • protectarea.command.protect.publicperms - Permission to modify public permission overrides
  • protectarea.command.protect.trustedperms - Permission to modify trusted permission overrides
  • protectarea.command.protect.modifiers - Permission to modify damage and stamina modifiers
  • protectarea.command.protect.modifiers.players - Permission to modify player modifiers (subcommand)
  • protectarea.command.protect.expand - Permission to expand builder tool selections
  • protectarea.command.protect.addregion - Permission to add regions to protected areas
  • protectarea.command.protect.removeregion - Permission to remove regions from protected areas
  • protectarea.command.protect.notification - Permission to modify notification preferences
  • protectarea.command.protect.removenpcs - Permission to remove NPCs from protected areas

Modifier System Help

How Modifiers Work

Modifiers use a multiplicative system where values are multiplied:

  • 1.0 = No change (default)
  • < 1.0 = Reduction (e.g., 0.5 = 50% less, 0.3 = 70% less)
  • > 1.0 = Increase (e.g., 1.25 = 25% more, 2.0 = double)
  • 0.0 = Minimum (no damage/stamina consumption)
  • All modifier values must be >= 0.0 (negative values are not allowed)

Formula: newValue = originalValue * modifier

Examples:

  • damagetaken = 0.5 → Damage taken is multiplied by 0.5 (50% less damage)
  • damagedealt = 1.0 → Damage dealt is multiplied by 1 (no effect)
  • staminataken = 0.3 → Stamina consumption is multiplied by 0.3 (70% less stamina used)
  • staminataken = 1.25 → Stamina consumption is multiplied by 1.25 (12.5% more stamina used)

Modifier Types

  1. NPC Modifiers (/protect modifiers npcs <areaname>) - Apply to all NPCs in the area
  2. Public Player Modifiers (/protect modifiers players public <areaname>) - Apply to non-owners/trusted players
  3. Trusted Player Modifiers (/protect modifiers players trusted <areaname>) - Apply to owners and trusted players

Modifier Separation

  • Public vs Trusted: You can set different modifiers for public players and trusted players independently
  • NPCs vs Players: NPCs and players have completely separate modifier configurations
  • OP Bypass: Server operators (OP group or * permission) automatically bypass all modifier effects

Usage Examples

# Make NPCs take 50% less damage
/protect modifiers npcs MyArea damagetaken 0.5

# Make public players take 50% less damage, trusted players take normal damage
/protect modifiers players public MyArea damagetaken 0.5
/protect modifiers players trusted MyArea damagetaken 1.0

# Make trusted players deal double damage
/protect modifiers players trusted MyArea damagedealt 2.0

# Make NPCs consume 30% less stamina
/protect modifiers npcs MyArea staminataken 0.3

# View all modifier configurations
/protect modifiers show MyArea

Detailed Features

  • ⚔️ PvP/PvE/EvP Protection: Independent control over player-vs-player, player-vs-environment (player attacking entities), and environment-vs-player (entities attacking players) damage protection
  • 🎬 Title Notifications: Display visual title overlays when players enter or leave areas with customizable icons, durations, and fade effects
  • 🎯 Granular Block Protection: Separate flags for block modification, builder tools, and block interactions
  • 🔢 Advanced Difficulty (Damage & Stamina) Modifiers: Separate modifiers for damage taken/dealt and stamina consumption, with NPC/public/trusted separation. Controle game difficulty and survival rate.
  • 🛡️ Multi-Area Protection: Create unlimited protected areas with unique names and settings
  • 🗺️ Multi-Region Areas: Each area can contain multiple regions (cuboids), allowing complex protected zone shapes. Add or remove regions dynamically
  • 👥 Flexible Ownership: Multiple owners per area with trusted player system for collaborative builds
  • ⚙️ Granular Protection Flags: Control block placement/breaking, builder tools, interactions, PvP, PvE, EvP, fall damage, and mob spawn (all/hostile/neutral/friendly) independently
  • 🌍 Global Areas: Create world-wide protection zones that apply to entire worlds
  • 👁️ Visual Feedback: Display area boundaries with the native selection tool visualization
  • 🔐 Permission Overrides: Layered permission system that works alongside other permission providers (like LuckPerms). Additions work additively (alongside base layer permissions), removals work as filters (remove permissions from base layer). Separate public permissions (for anyone) and trusted permissions (for owners/trusted only) with smart precedence rules
  • 💬 Custom Messages: Set enter and leave messages that players see when crossing area boundaries
  • 🔔 Notification Preferences: Choose how protection messages are displayed - chat messages or in-game notifications
  • ⚔️ Combat Protection: Control PvP, PvE, EvP, fall damage, and mob spawn protection (all/hostile/neutral/friendly) independently
  • 🎯 Entity Scope Control: Protect from players only or all entities (except admins)
  • 👑 Admin Bypass: Server operators automatically bypass all protections
  • 💾 Persistent Storage: All areas are saved automatically and persist across server restarts
  • 🛡️ Comprehensive NPC Spawn Protection: Three-tier protection system that proactively marks chunks as unspawnable, reactively blocks spawn jobs, and automatically removes existing NPCs from protected areas. Prevents NPCs from spawning and cleans up NPCs loaded from save files or that bypassed spawn protection (experimental)
  • 🎮 Manual NPC Removal: Use /protect removenpcs <areaname> to manually remove all NPCs from a protected area and mark chunks to prevent respawn
  • 📊 Area Priority for Overlaps: When areas overlap at the same position, the area with the highest priority (0-100) wins. Set at creation or with /protect <areaname> priority <value>

What's New in v0.8.2

  • 📊 Overlapping Area Priority: Areas now have a priority value (0-100, default 0). When multiple areas overlap at a position, the highest-priority area applies. Use /protect <areaname> priority <value> to set priority; optional --priority <n> when creating areas. Resolves overlapping-area behavior (see Bucket List).
  • 📝 New Title Commands: Use /protect <areaname> message title enter <message> and /protect <areaname> message title leave <message> to set title messages. Titles work independently from chat messages - you can use both, either, or neither
  • 🎬 EventTitle Support for Enter/Leave Notifications: Display visual titles when players enter or leave protected areas using Hytale's native EventTitle system. Titles appear as overlays on the screen with customizable settings
  • 🎨 Customizable Title Settings: Personalize title displays with:
    • Icons: Add icon identifiers to titles for visual flair
    • Major Titles: Mark titles as major for larger, more prominent displays
    • Custom Durations: Control how long titles stay visible (default: 4.0 seconds)
    • Fade Effects: Customize fade-in and fade-out durations (default: 1.5 seconds each)
  • 📝 New Title Commands: Use /protect message title <areaname> enter <message> and /protect message title <areaname> leave <message> to set title messages. Titles work independently from chat messages - you can use both, either, or neither
  • 🛡️ Three-Tier NPC Spawn Protection System: Complete overhaul of NPC spawn protection with three complementary systems working together:
    • Chunk Spawn Protection System: Proactively marks chunks as unspawnable when they overlap with protected areas that have mob spawn protection enabled. This prevents spawn jobs from being created in the first place, even for newly loaded chunks
    • Spawn Job Protection System: Reactively blocks spawn jobs that are created in protected areas, preventing NPCs from spawning. This catches spawn jobs that were created before chunks were marked or in edge cases
    • NPC Protection System: Reactive fallback system that removes NPCs that are in protected areas with mob spawn protection enabled. This catches NPCs that were loaded from save files, spawned before protection was enabled, or somehow bypassed the spawn protection systems
  • 🗺️ Proactive Chunk Marking: Chunks are automatically marked as unspawnable when they overlap with protected areas, preventing new spawn jobs from being created. The system tests multiple Y levels and chunk corners to catch protected areas at different vertical positions
  • 🚫 Intelligent Spawn Job Blocking: Spawn jobs are properly terminated using the spawn system's cleanup mechanism, preventing feedback loops and ensuring spawn statistics are correctly updated. The system marks roles as unspawnable to prevent future spawns
  • 🧹 Automatic NPC Cleanup: NPCs in protected areas are automatically removed by the NPC Protection System. The system tracks processed entities to avoid duplicate processing and runs more aggressively during server startup to catch all NPCs
  • 🎮 Manual NPC Removal Command: New /protect removenpcs <areaname> command allows owners and admins to manually remove all NPCs from a protected area. The command marks chunks as unspawnable to prevent respawn and provides feedback on how many NPCs were removed
  • 🔧 Improved Mob Spawn Protection: The mob spawn protection system now works at multiple levels - chunk marking, spawn job blocking, and NPC removal - ensuring comprehensive protection against NPC spawning in protected areas
  • 📋 Better Spawn Protection Granularity: Support for all/hostile/neutral/friendly mob spawn protection flags, with intelligent role detection to determine NPC types and apply appropriate protections

What's New in v0.7.1

  • 🔐 Permission Overrides: Layered permission system that works alongside other permission providers (like LuckPerms). Additions work additively (alongside base layer permissions), removals work as filters (remove permissions from base layer). Separate public permissions (for anyone) and trusted permissions (for owners/trusted only) with smart precedence rules
  • 🔗 Multi-Layered Permission Provider Integration: Implementation of a multi-layered permission provider integration that allows the mod to work seamlessly with different permission systems (LuckPerms, Hytale's PermissionsModule, etc.), querying all providers to understand base layer permissions and ensuring compatibility across various permission management setups
  • ⚔️ Advanced Damage & Stamina Modifiers: Completely reworked modifier system with separate damage taken/dealt and stamina consumption modifiers. Set different modifiers for NPCs, public players, and trusted players
  • 🎯 Separate Modifier Types: Control damagetaken, damagedealt, and staminataken independently for fine-grained control
  • 👥 Public vs Trusted Separation: Apply different modifiers to public players (non-owners/trusted) and trusted players (owners/trusted) separately
  • 🤖 NPC Support: Set modifiers specifically for NPCs, independent from player modifiers
  • 🔢 Multiplicative System: Modifiers multiply values (1.0 = no change, < 1.0 reduces, > 1.0 increases). All modifiers must be >= 0.0
  • 🛡️ OP Bypass: Server operators automatically bypass all modifier effects
  • 📋 Nested Commands: Use /protect modifiers npcs <areaname>, /protect modifiers players public <areaname>, /protect modifiers players trusted <areaname>, and /protect modifiers show <areaname> for organized modifier management
  • ✏️ Area Renaming: Rename protected areas using /protect rename <areaname> <new-name>. Only owners can rename areas, and the new name must be unique within the same world
  • 🔐 Permissions Renaming: All command permissions have been renamed for better consistency and clarity

0.7.0 Migration from Old System

Areas created with the old modifier system (v0.6.0 and earlier) will automatically migrate:

  • Old damageModifierpublicModifiers.damageTaken and publicModifiers.damageDealt
  • Old staminaModifierpublicModifiers.staminaTaken
  • NPC and trusted modifiers default to 1.0 (no change)
  • Old modifier values of 0.0 (old default meaning "no change") are automatically converted to 1.0 (new default)

Bucket List (by feasibility)

  • Owners and Trusted players integration to native PermissionModule groups.
  • Owners and Trusted players integration to native LuckPerms groups.
  • Review plugin's data storage structure.
  • Display areas on maps. Always show areas, show only owned/trusted, always hide certains areas, show certain areas on the map, etc.
  • Database integration.
  • Simpleclaims - flag an area as unclaimable.
  • Integration with other plugins: Allow other plugins to interact/use the ProtectedArea API (needs iteration on use-cases and requirements), what plugins ProtectedAres could integrate with?
  • HyPerms, PermPlus integration
  • NPC spawn exceptions: Allow exceptions for individual NPCs so that "deny hostile spawns" (and other spawn flags) don't affect specific NPCs. Use case: a hostile NPC (e.g. a skeleton) used as a talkable NPC in spawn—players should be able to speak to it, and it should persist across server restarts instead of being removed by the flag. Options: (1) Per-category way to target individual NPCs nearby (similar to how NPCDialog targets specific NPCs), so one allowed skeleton can exist while no other hostiles spawn; or (2) make the mod compatible with NPCDialog (and similar mods)—any NPC targeted by NPCDialog would be ignored by this mod's spawn flags.

Missing API components

  • Improve region visualization style when displaying regions in the show command, no more green boxes
  • Area access control system (blocking entering and/or leaving areas)
  • Additional interaction protections (collateral damage, item changes, harvesting, picking plants, placing liquids, etc.)

Looking for Testers!🧪

Help us improve Protected Areas! We're actively seeking dedicated testers to help identify bugs, test new features, and provide feedback. With limited free time, we can either focus on coding or testing - and we'd love your help with the testing side!

What we're looking for:

  • Players willing to test new features and report bugs
  • Server admins who can test in real-world scenarios
  • Feedback on usability, edge cases, and potential improvements

Compensation can be arranged - we're open to discussing fair compensation for dedicated testers who help improve the mod. Reach out on Discord if you're interested!

License

All Rights Reserved

This plugin is provided as-is for use with Hytale servers. The author assumes no responsibility for any consequences, damages, or issues that may arise from using this plugin.

Restrictions:

  • This plugin may not be distributed, redistributed, or shared in other platforms than CurseForge without explicit permission from the author
  • Decompilation, reverse engineering, or disassembly of this plugin is strictly prohibited
  • Modification or external use of this plugin's code is strictly prohibited
  • Commercial use or sale of this plugin is strictly prohibited without authorization