Add some missing CreatureSpawnEvent.SpawnReason calls
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -73,15 +73,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -574,6 +604,11 @@
|
||||
@@ -574,7 +604,12 @@
|
||||
entitywitch.setCustomNameVisible(this.getCustomNameVisible());
|
||||
}
|
||||
|
||||
- this.world.addEntity(entitywitch);
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.callEntityTransformEvent(this, entitywitch, EntityTransformEvent.TransformReason.LIGHTNING).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ this.world.addEntity(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING);
|
||||
+ // CraftBukkit end
|
||||
this.world.addEntity(entitywitch);
|
||||
this.die();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user