diff options
-rw-r--r-- | pom.xml | 2 | ||||
-rw-r--r-- | src/main/java/dev/genbyte/sunfright/Damager.java | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/pom.xml b/pom.xml index d35225e..e977fca 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ <groupId>dev.genbyte.sunfright</groupId> <artifactId>sunfright</artifactId> <packaging>jar</packaging> - <version>0.4.0</version> + <version>0.4.1</version> <name>sunfright</name> <description>Burn me to a crisp, large glowing orb!</description> 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)); } }); |