about summary refs log tree commit diff
path: root/src/main/java
diff options
context:
space:
mode:
authorGenny <gen@nyble.dev>2020-03-03 21:11:51 -0600
committerGenny <gen@nyble.dev>2020-03-03 21:11:51 -0600
commit9afff6f780bdde6f6259b30a4844fdd6d271db57 (patch)
tree583caa21b39cf31b7967c2d7a34c1238b78dc304 /src/main/java
parent94faaad338f884868f92d3b3e74ae0d1f6d16d09 (diff)
downloadsunfright-9afff6f780bdde6f6259b30a4844fdd6d271db57.tar.gz
sunfright-9afff6f780bdde6f6259b30a4844fdd6d271db57.zip
Add check helmet is not null in damager
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/dev/genbyte/sunfright/Damager.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/dev/genbyte/sunfright/Damager.java b/src/main/java/dev/genbyte/sunfright/Damager.java
index bfb977f..cdee7c1 100644
--- a/src/main/java/dev/genbyte/sunfright/Damager.java
+++ b/src/main/java/dev/genbyte/sunfright/Damager.java
@@ -27,7 +27,8 @@ public class Damager extends BukkitRunnable {
 
 			if (skylight > 3) {
 				new DoDamage(player, (byte) 1).runTask(sf);
-			} else if (player.getInventory().getHelmet().getEnchantmentLevel(Enchantment.VANISHING_CURSE) == 2) {
+			} else if (player.getInventory().getHelmet() != null
+					&& player.getInventory().getHelmet().getEnchantmentLevel(Enchantment.VANISHING_CURSE) == 2) {
 				player.getInventory().setHelmet(new ItemStack(Material.AIR));
 			}
 		});