Compare commits

...

1 Commits
1.2 ... 1.2.1

Author SHA1 Message Date
hyperdefined
1c18a1a90c added missing check (fixes #2) 2022-02-05 16:42:42 -05:00
2 changed files with 4 additions and 1 deletions

View File

@@ -23,7 +23,7 @@
<groupId>lol.hyper</groupId>
<artifactId>toolstats</artifactId>
<version>1.2</version>
<version>1.2.1</version>
<packaging>jar</packaging>
<name>ToolStats</name>

View File

@@ -140,6 +140,9 @@ public class EntityDamage implements Listener {
@EventHandler
public void onDamage(EntityDamageByBlockEvent event) {
if (!(event.getEntity() instanceof LivingEntity)) {
return;
}
LivingEntity livingEntity = (LivingEntity) event.getEntity();
if (livingEntity instanceof Player) {
Player player = (Player) livingEntity;