Skip to content

Commit

Permalink
Fix NPE on /dragoneggdrop if the update checker was disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
2008Choco committed Mar 5, 2020
1 parent cc2a4cc commit 51ef857
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
sender.sendMessage(ChatColor.GOLD + "Version: " + plugin.getDescription().getVersion());

UpdateResult result = UpdateChecker.get().getLastResult();
if (sender.isOp() && result.requiresUpdate()) {
if (sender.isOp() && result != null && result.requiresUpdate()) {
sender.sendMessage(ChatColor.AQUA + "New version available: " + result.getNewestVersion());
}

Expand Down

0 comments on commit 51ef857

Please sign in to comment.