Fixed NPE when running a custom build of CraftBukkit. This fixes issue #BUKKIT-765

This commit is contained in:
Nathan Adams
2012-02-18 14:06:21 +00:00
parent d057ee1e07
commit 3b634b14f6
3 changed files with 6 additions and 10 deletions

View File

@@ -1024,7 +1024,7 @@ public final class CraftServer implements Server {
}
public void onPlayerJoin(Player player) {
if ((updater.isEnabled()) && (player.hasPermission(Server.BROADCAST_CHANNEL_ADMINISTRATIVE))) {
if ((updater.isEnabled()) && (updater.getCurrent() != null) && (player.hasPermission(Server.BROADCAST_CHANNEL_ADMINISTRATIVE))) {
if ((updater.getCurrent().isBroken()) && (updater.getOnBroken().contains(updater.WARN_OPERATORS))) {
player.sendMessage(ChatColor.DARK_RED + "The version of CraftBukkit that this server is running is known to be broken. Please consider updating to the latest version at dl.bukkit.org.");
} else if ((updater.isUpdateAvailable()) && (updater.getOnUpdate().contains(updater.WARN_OPERATORS))) {