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

By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
CraftBukkit/Spigot
2012-02-18 14:06:21 +00:00
parent cb0ee4963b
commit 818efc6bca
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))) {