Skip to content

Commit

Permalink
Fix NPE logging death block block.
Browse files Browse the repository at this point in the history
  • Loading branch information
totemo committed Feb 12, 2021
1 parent 7308364 commit 9b8abbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>nu.nerd</groupId>
<artifactId>KitchenSink</artifactId>
<name>KitchenSink</name>
<version>0.15.0</version>
<version>0.15.1</version>
<packaging>jar</packaging>
<description>A plugin for miscellaneous functionality that hasn't found a home elsewhere.</description>
<url>https://github.com/NerdNu/KitchenSink</url>
Expand Down
2 changes: 1 addition & 1 deletion src/nu/nerd/kitchensink/KitchenSinkListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ public void catchEntityPreDeath(EntityDamageEvent event) {
if (event instanceof EntityDamageByBlockEvent) {
EntityDamageByBlockEvent e = (EntityDamageByBlockEvent) event;
Block block = e.getDamager();
lastDamage = "block " + block.getType().toString() + " ";
lastDamage = "block " + (block != null ? block.getType().toString() : "?") + " ";
} else if (event instanceof EntityDamageByEntityEvent) {
Entity damager = ((EntityDamageByEntityEvent) event).getDamager();
if (damager instanceof Projectile) {
Expand Down

0 comments on commit 9b8abbf

Please sign in to comment.