mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-01-25 08:51:33 +01:00
1.10- support for natural spawning disable
This commit is contained in:
parent
d4a9e5ab84
commit
70374c7a7c
@ -674,8 +674,13 @@ public class Entity implements Listener {
|
||||
if (!skyblock.getIslandManager().hasSetting(livingEntity.getLocation(), IslandRole.Owner, "NaturalMobSpawning")) {
|
||||
if (event.getSpawnReason() == SpawnReason.JOCKEY || event.getSpawnReason() == SpawnReason.MOUNT) {
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(skyblock, () -> {
|
||||
for (org.bukkit.entity.Entity passenger : livingEntity.getPassengers())
|
||||
passenger.remove();
|
||||
if (NMSUtil.getVersionNumber() > 10) { // getPassengers() was added in 1.11
|
||||
for (org.bukkit.entity.Entity passenger : livingEntity.getPassengers())
|
||||
passenger.remove();
|
||||
} else {
|
||||
if (livingEntity.getPassenger() != null)
|
||||
livingEntity.getPassenger().remove();
|
||||
}
|
||||
livingEntity.remove();
|
||||
});
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user