From 8970de026b4721d98d10f3af6cac008c18485831 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 30 Mar 2011 04:20:24 -0500 Subject: [PATCH] don't try sending a message to a player who isn't online; NPEs suck removed instaDestroyMaterials since it is no longer needed --- src/com/bukkit/mcteam/factions/Conf.java | 1 - src/com/bukkit/mcteam/factions/FPlayer.java | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/bukkit/mcteam/factions/Conf.java b/src/com/bukkit/mcteam/factions/Conf.java index 9ba0f4fc..1f1b50bf 100644 --- a/src/com/bukkit/mcteam/factions/Conf.java +++ b/src/com/bukkit/mcteam/factions/Conf.java @@ -59,7 +59,6 @@ public class Conf { public static transient Set safeZoneNerfedCreatureTypes = new HashSet(); - public static transient Set instaDestroyMaterials = new HashSet(); // This one is not really configuration therefore transient public static transient int mapHeight = 8; public static transient int mapWidth = 49; diff --git a/src/com/bukkit/mcteam/factions/FPlayer.java b/src/com/bukkit/mcteam/factions/FPlayer.java index fcc0053f..1be671f6 100644 --- a/src/com/bukkit/mcteam/factions/FPlayer.java +++ b/src/com/bukkit/mcteam/factions/FPlayer.java @@ -387,7 +387,8 @@ public class FPlayer { // Messages // -------------------------------------------- // public void sendMessage(String message) { - this.getPlayer().sendMessage(Conf.colorSystem + message); + if (this.getPlayer() != null) + this.getPlayer().sendMessage(Conf.colorSystem + message); } public void sendMessage(List messages) {