Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
CondCriticalHit - fix an issue with Skript 2.7 (event type changed or…
Browse files Browse the repository at this point in the history
… something)
  • Loading branch information
ShaneBeee committed May 30, 2023
1 parent d7ba09f commit d643088
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import ch.njol.util.Kleenean;
import org.bukkit.event.Event;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand All @@ -36,7 +37,7 @@ public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelaye
Skript.error("'his is critical' requires a PaperMC server.", ErrorQuality.SEMANTIC_ERROR);
return false;
}
if (!ParserInstance.get().isCurrentEvent(EntityDamageByEntityEvent.class)) {
if (!ParserInstance.get().isCurrentEvent(EntityDamageEvent.class)) {
Skript.error("'hit is critical' is only available in an entity damage event!", ErrorQuality.SEMANTIC_ERROR);
return false;
}
Expand Down

0 comments on commit d643088

Please sign in to comment.