Fix NPE thrown on player death event

This commit is contained in:
Pim van der Loos 2020-03-18 18:31:37 +01:00
parent c5abedc89b
commit 19ab2cdab1
No known key found for this signature in database
GPG Key ID: C16F020ADAE6D5A8
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>nl.pim16aap2</groupId>
<artifactId>ArmoredElytra</artifactId>
<version>2.4.10</version>
<version>2.4.12</version>
<repositories>
<repository>

View File

@ -511,8 +511,8 @@ public class EventHandlers implements Listener
public void onEquip(ArmorEquipEvent e)
{
if (!e.getType().equals(ArmorType.CHESTPLATE) ||
!e.getNewArmorPiece().getType().equals(Material.ELYTRA) ||
e.getNewArmorPiece() == null)
e.getNewArmorPiece() == null ||
!e.getNewArmorPiece().getType().equals(Material.ELYTRA) )
return;
ArmorTier armorTier = nbtEditor.getArmorTier(e.getNewArmorPiece());