mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-08 13:44:59 +00:00
added missing check (fixes #2)
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<groupId>lol.hyper</groupId>
|
<groupId>lol.hyper</groupId>
|
||||||
<artifactId>toolstats</artifactId>
|
<artifactId>toolstats</artifactId>
|
||||||
<version>1.2</version>
|
<version>1.2.1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>ToolStats</name>
|
<name>ToolStats</name>
|
||||||
|
|||||||
@@ -140,6 +140,9 @@ public class EntityDamage implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onDamage(EntityDamageByBlockEvent event) {
|
public void onDamage(EntityDamageByBlockEvent event) {
|
||||||
|
if (!(event.getEntity() instanceof LivingEntity)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
LivingEntity livingEntity = (LivingEntity) event.getEntity();
|
LivingEntity livingEntity = (LivingEntity) event.getEntity();
|
||||||
if (livingEntity instanceof Player) {
|
if (livingEntity instanceof Player) {
|
||||||
Player player = (Player) livingEntity;
|
Player player = (Player) livingEntity;
|
||||||
|
|||||||
Reference in New Issue
Block a user