mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-01-24 16:31:38 +01:00
Stop Endersignal in island worlds
This commit is contained in:
parent
b4db3f4bf6
commit
105e5be768
@ -611,6 +611,18 @@ public class Entity implements Listener {
|
||||
});
|
||||
event.setCancelled(true); // For other plugin API reasons.
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onEntitySpawn(EntitySpawnEvent event) {
|
||||
WorldManager worldManager = plugin.getWorldManager();
|
||||
if(worldManager.isIslandWorld(event.getLocation().getWorld())) {
|
||||
org.bukkit.entity.Entity entity = event.getEntity();
|
||||
|
||||
if(event.getEntity() instanceof EnderSignal) {
|
||||
((EnderSignal) entity).setTargetLocation(entity.getLocation().add(0d, 50d, 0d));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onDamageVehicle(VehicleDamageEvent event) {
|
||||
|
Loading…
Reference in New Issue
Block a user