
RestrictMob
RestrictMob. It provides server administrators with a streamlined system to define Safe Zones where hostile and neutral mobs.
3
1
RestrictMob 1.0
release11 апреля 2026 г.RestrictMob
A lightweight, high-performance Minecraft plugin that allows server administrators to define Safe Zones where hostile and neutral mobs cannot spawn or enter.
Built for Paper 1.21+ with Java 21. Zero per-tick overhead — uses event-driven checks only.
Features
- Zone Creation — Select two corners with a wand item (default: Blaze Rod) and define named rectangular zones.
- Spawn Prevention — Blocks hostile and neutral mob spawns inside zones from all sources (natural, spawner, egg, custom, etc.).
- Entry Prevention — Prevents mobs from walking or teleporting into zones using Paper's
EntityMoveEventwith proximity pre-filtering. - Knockback — Mobs attempting to cross a zone boundary are gently pushed back (configurable strength).
- Async Persistence — Zones are saved to
data/zones.ymlasynchronously. No file I/O on the main thread during gameplay. - Fully Configurable — Wand item, check radius, knockback multiplier, teleport blocking toggle, and all messages are editable in
config.yml.
Requirements
| Requirement | Version |
|---|---|
| Server | Paper 1.21+ (or any Paper fork such as Purpur) |
| Java | 21 or newer |
| Build Tool | Maven 3.9+ |
Installation
- Clone the repository and build:
mvn clean package - Copy
target/RestrictMob-1.0.jarinto your server'splugins/folder. - Restart or reload the server.
Commands
All commands require the titanzones.admin permission (default: op).
| Command | Description |
|---|---|
/zones wand | Gives the selection wand item |
/zones create <name> | Creates a zone from your current two-point selection |
/zones delete <name> | Removes a saved zone |
/zones list | Lists all active zones with coordinates |
Selection Workflow
- Run
/zones wandto receive the selection tool. - Left-click a block to set Position 1.
- Right-click a block to set Position 2.
- Run
/zones create <name>to save the zone.
Both positions must be in the same world. The wand is identified by a persistent data tag, not by its display name.
Configuration
Default config.yml:
wand-item: BLAZE_ROD
check-radius: 5.0
knockback-multiplier: 1.5
block-teleport: true
messages:
prefix: "&8[&6TitanZones&8] "
zone-created: "&aZone '&e%name%&a' created successfully."
zone-deleted: "&cZone '&e%name%&c' deleted."
# ... (all messages are customizable)
| Key | Description |
|---|---|
wand-item | Material name for the selection wand |
check-radius | Distance (blocks) from zone boundaries to begin evaluating entity movement |
knockback-multiplier | Velocity multiplier for boundary knockback. Set to 0 to disable. |
block-teleport | Whether to cancel entity teleportation into zones |
How It Works
- Spawn blocking listens to
CreatureSpawnEventandEntitySpawnEvent. Any hostile or neutral mob spawning inside a zone is cancelled regardless of spawn reason. - Movement blocking uses Paper's
EntityMoveEventwith a three-stage filter:- Skip non-restricted entities (players, passive animals, villagers).
- Skip sub-block movement (
hasChangedBlock()check). - Skip entities far from any zone (pre-expanded bounding box proximity test).
- Cancel and apply knockback only when a mob crosses from outside to inside a zone.
- Teleport blocking intercepts
EntityTeleportEventfor the same entity types. - Entities already inside a zone (e.g., zone created around them) are allowed to move freely so they can leave.
Permissions
| Permission | Description | Default |
|---|---|---|
titanzones.admin | Access to all /zones commands | op |
Project Structure
src/main/java/com/titanzones/
TitanZonesMain.java Plugin entry point
ZoneManager.java Zone storage, spatial queries, async I/O
ZoneCommand.java Command handler and selection tracking
ZoneTabCompleter.java Tab completion for subcommands and zone names
ZoneListener.java Event listeners for spawns, movement, teleport, wand clicks
src/main/resources/
plugin.yml Plugin metadata
config.yml Default configuration
License
This project is provided as-is. See the repository for license details.
Совместимость
Ссылки
Создатели
Детали
Лицензия:LicenseRef-All-Rights-Reserved
Опубликован:2 недели назад
Обновлён:2 недели назад
