Fix for /f permanent and /f peaceful commands giving an NPE if run from console

Fix for rare NPE when Spout territory info update is run and affected player disconnects at precisely that moment
Clarified "cannot attack neutral faction" messages to indicate enemy status is needed
Updated Bukkit lib to correspond with CB 1337
This commit is contained in:
Brettflan committed 2011-10-20 18:08:55 -05:00
1 parent ee654b761e
commit 38e128010c
5 files changed
+13 -7

No files matched your search

@@ -3,6 +3,8 @@ package com.massivecraft.factions.integration;
import java.util.HashMap;
import java.util.Map;
import org.bukkit.entity.Player;
import com.massivecraft.factions.Board;
import com.massivecraft.factions.Conf;
import com.massivecraft.factions.FLocation;
@@ -44,7 +46,11 @@ public class SpoutMainListener extends SpoutListener
public boolean updateTerritoryDisplay(FPlayer player)
{
SpoutPlayer sPlayer = SpoutManager.getPlayer(player.getPlayer());
Player p = player.getPlayer();
if (p == null)
return false;
SpoutPlayer sPlayer = SpoutManager.getPlayer(p);
if (!sPlayer.isSpoutCraftEnabled() || (Conf.spoutTerritoryDisplaySize <= 0 && ! Conf.spoutTerritoryNoticeShow))
return false;