Skip to content

Commit aeaeee6

Browse files
committed
revert this since we can now
1 parent d8c7425 commit aeaeee6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/lol/hyper/toolstats/events/EntityDamage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class EntityDamage implements Listener {
4040

4141
private final ToolStats toolStats;
4242
public final Set<UUID> trackedMobs = new HashSet<>();
43-
private final List<String> ignoredDamageCauses = Arrays.asList("SUICIDE", "VOID", "CUSTOM", "KILL");
43+
private final List<EntityDamageEvent.DamageCause> ignoredCauses = Arrays.asList(EntityDamageEvent.DamageCause.SUICIDE, EntityDamageEvent.DamageCause.VOID, EntityDamageEvent.DamageCause.CUSTOM, EntityDamageEvent.DamageCause.KILL);
4444

4545
public EntityDamage(ToolStats toolStats) {
4646
this.toolStats = toolStats;
@@ -57,8 +57,8 @@ public void onDamage(EntityDamageByEntityEvent event) {
5757
}
5858

5959
// ignore void and /kill damage
60-
String cause = event.getCause().toString().toUpperCase();
61-
if (ignoredDamageCauses.contains(cause)) {
60+
EntityDamageEvent.DamageCause cause = event.getCause();
61+
if (ignoredCauses.contains(cause)) {
6262
return;
6363
}
6464

0 commit comments

Comments
 (0)