Discussion in 'Plugin Development' started by johnnyD, Jan 20, 2021.
How could I go about creating a region and then allowing certain mobs to only spawn in the region?
Create a WorldGuard region and then add flag deny-spawn and list out everything you don't want to appear in the region.
I knew you could do it with the world guard plugin, but I was wondering how you would do it without worldguard
You can listen to CreateSpawnEvent then check if the entity is within the bounds of the area. If they are, return. If not, set cancelled true.
Separate names with a comma.