Skip to content

Commit

Permalink
Fix CustomNpcs mod async call bukkit event compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Mgazul committed Jan 31, 2024
1 parent aee876c commit bd39979
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@
+
+ public boolean strikeLightning(Entity entitylightning, LightningStrikeEvent.Cause cause) {
+ // Mohist start - Compat for Forge,ignore modded weather effect
+ if (entitylightning.getBukkitEntity() instanceof org.bukkit.entity.LightningStrike) {
+ if (!AsyncCatcher.catchAsync() && entitylightning.getBukkitEntity() instanceof org.bukkit.entity.LightningStrike) {
+ LightningStrikeEvent lightning = CraftEventFactory.callLightningStrikeEvent((org.bukkit.entity.LightningStrike) entitylightning.getBukkitEntity(), cause);
+ this.getCBServer().getPluginManager().callEvent(lightning);
+ if (lightning.isCancelled())
Expand Down

0 comments on commit bd39979

Please sign in to comment.