mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 13:36:44 +01:00
Fixed cancelled lighting strikes dealing damage.
This commit is contained in:
parent
fb3e3ade90
commit
cd12f057a7
1 changed files with 8 additions and 7 deletions
|
@ -130,14 +130,15 @@ public class WorldServer extends World implements BlockChangeDelegate {
|
|||
}
|
||||
|
||||
public boolean a(Entity entity) {
|
||||
if (super.a(entity)) {
|
||||
// CraftBukkit start
|
||||
LightningStrikeEvent lightning = new LightningStrikeEvent((org.bukkit.World) world, (org.bukkit.entity.LightningStrike) entity.getBukkitEntity());
|
||||
this.cserver.getPluginManager().callEvent(lightning);
|
||||
// CraftBukkit start
|
||||
LightningStrikeEvent lightning = new LightningStrikeEvent((org.bukkit.World) world, (org.bukkit.entity.LightningStrike) entity.getBukkitEntity());
|
||||
this.cserver.getPluginManager().callEvent(lightning);
|
||||
|
||||
if (lightning.isCancelled()) {
|
||||
return false;
|
||||
}
|
||||
if (lightning.isCancelled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (super.a(entity)) {
|
||||
this.server.serverConfigurationManager.a(entity.locX, entity.locY, entity.locZ, 512.0D, this.dimension, new Packet71Weather(entity));
|
||||
// CraftBukkit end
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue