Skip to content

Commit

Permalink
Fixed Frostcast#7 with some additional NPE protection
Browse files Browse the repository at this point in the history
  • Loading branch information
rlf committed Dec 6, 2014
1 parent 7c91828 commit 4ec29f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/us/talabrek/ultimateskyblock/SkyBlockMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,9 @@ private boolean isNormalChallenge(String challengeName) {
}

public void onClick(InventoryClickEvent event) {
if (event == null || event.getCurrentItem() == null || event.getWhoClicked() == null) {
return; // Bail out, nothing we can do anyway
}
Player p = (Player) event.getWhoClicked();
ItemMeta meta = event.getCurrentItem().getItemMeta();
SkullMeta skull = meta instanceof SkullMeta ? (SkullMeta) meta : null;
Expand Down

0 comments on commit 4ec29f7

Please sign in to comment.