mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Add extra SpawnReasons to spawn listener
This commit is contained in:
parent
135c6f2c15
commit
17698065a0
@ -2024,8 +2024,6 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CreatureSpawnEvent.SpawnReason reason = event.getSpawnReason();
|
CreatureSpawnEvent.SpawnReason reason = event.getSpawnReason();
|
||||||
//TODO needs an overhaul for the increased number of spawn reasons added to this event.
|
|
||||||
//I can't believe they waited so damn long to expand this API set.
|
|
||||||
switch (reason) {
|
switch (reason) {
|
||||||
case DISPENSE_EGG:
|
case DISPENSE_EGG:
|
||||||
case EGG:
|
case EGG:
|
||||||
@ -2038,6 +2036,16 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
break;
|
break;
|
||||||
case REINFORCEMENTS:
|
case REINFORCEMENTS:
|
||||||
case NATURAL:
|
case NATURAL:
|
||||||
|
case MOUNT:
|
||||||
|
case PATROL:
|
||||||
|
case RAID:
|
||||||
|
case SHEARED:
|
||||||
|
case SHOULDER_ENTITY:
|
||||||
|
case SILVERFISH_BLOCK:
|
||||||
|
case TRAP:
|
||||||
|
case VILLAGE_DEFENSE:
|
||||||
|
case VILLAGE_INVASION:
|
||||||
|
case BEEHIVE:
|
||||||
case CHUNK_GEN:
|
case CHUNK_GEN:
|
||||||
if (!area.isMobSpawning()) {
|
if (!area.isMobSpawning()) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user