EngineHub / EngineHub/WorldGuard

Flags to Prevent Monsters From Enterion a Region, and/or to Prevent Mobs From Dropping Loot inside a Region

Open
#1,777 2 comments 0 reactions 0 assignees View on GitHub
status:pending type:feature-request
Dominant language
Java
Stars
938
Forks
671
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Currently a region that protects players from taking damage from hostile mobs can be used by players to lure hostile mobs into the region and safely kill them to farm EXP and items without taking any damage.

**Describe the solution you'd like**
A flag to prevent hostile mobs from entering a region would prevent this. If a hostile mob walks into the region , they would despawn. And if they aggro a player who is in the region, they would despawn immediately no matter how far away they are from the region (this prevents having the players deal with constant hordes of zombies who walk towards the region and despawn right at the border)

**Describe alternatives you've considered**
A flag to prevent mobs from dropping EXP and items would also work great. This would prevent players from intentionally farming mobs in the safe region. I thought the flags "item-drops" and "exp-drops" being set to false would already do this but in my testing I saw these flags only effect players, not mobs.
I think such flags would be a great addition even if my original suggestion were to be implemented, as they could serve different purposes.

**Additional context**
Flags to prevent mobs entering certain regions and dropping loot in certain regions already exist in the plugin [GriefPrevention Flags](https://www.spigotmc.org/resources/griefprevention-flags.55773/) ("NoMonsters" and "NoCombatLoot" respectively). However this plugin was recently discontinued and will soon be outdated, and it is not flexible as WorldGuard.
Here's a simple demonstration showing how "NoMonsters" works
[Video link.](https://streamable.com/9e40e4) Notice that the second zombie despawned immediately because I was already in the zone when he aggroed to me.
One side note about how they implement this is that mobs can still idly wander into the zone. However they will despawn the moment they try to attack anyone inside the zone.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.