Add EntityZapEvent
This commit is contained in:
@@ -1215,6 +1215,14 @@ public class CraftEventFactory {
|
||||
return !event.isCancelled();
|
||||
}
|
||||
|
||||
// Paper start
|
||||
public static com.destroystokyo.paper.event.entity.EntityZapEvent callEntityZapEvent(Entity entity, Entity lightning, Entity changedEntity) {
|
||||
com.destroystokyo.paper.event.entity.EntityZapEvent event = new com.destroystokyo.paper.event.entity.EntityZapEvent(entity.getBukkitEntity(), (LightningStrike) lightning.getBukkitEntity(), changedEntity.getBukkitEntity());
|
||||
entity.getBukkitEntity().getServer().getPluginManager().callEvent(event);
|
||||
return event;
|
||||
}
|
||||
// Paper end
|
||||
|
||||
public static boolean callEntityChangeBlockEvent(Entity entity, BlockPos position, net.minecraft.world.level.block.state.BlockState newBlock) {
|
||||
return CraftEventFactory.callEntityChangeBlockEvent(entity, position, newBlock, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user