mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Add extra SpawnReasons to spawn listener
This commit is contained in:
parent
135c6f2c15
commit
17698065a0
1 changed files with 10 additions and 2 deletions
|
@ -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 a new issue