Territory owner list was not being shown to people who aren't running the Spoutcraft client, when Spout was hooked... fixed

This commit is contained in:
Brettflan 2011-10-13 14:30:47 -05:00
parent d7a2a88f95
commit 358186764d
2 changed files with 11 additions and 3 deletions

View File

@ -50,12 +50,18 @@ public class SpoutFeatures
}
}
// If any Spout feature is enabled in conf.json, and we're successfully hooked into it
// If we're successfully hooked into Spout
public static boolean enabled()
{
return spoutMe;
}
// If Spout is available and the specified Player is running the Spoutcraft client
public static boolean availableFor(Player player)
{
return spoutMe && SpoutManager.getPlayer(player).isSpoutCraftEnabled();
}
// update displayed current territory for specified player; returns false if unsuccessful
public static boolean updateTerritoryDisplay(FPlayer player)

View File

@ -201,6 +201,8 @@ public class FactionsPlayerListener extends PlayerListener
Faction factionTo = Board.getFactionAt(to);
Faction myFaction = me.getFaction();
String ownersTo = myFaction.getOwnerListString(to);
boolean spoutClient = SpoutFeatures.availableFor(player);
if (factionFrom != factionTo)
{
me.sendFactionHereMessage();
@ -211,7 +213,7 @@ public class FactionsPlayerListener extends PlayerListener
Conf.ownedMessageOnBorder
&&
(
!SpoutFeatures.enabled()
!spoutClient
||
!Conf.spoutTerritoryOwnersShow
)
@ -224,7 +226,7 @@ public class FactionsPlayerListener extends PlayerListener
me.sendMessage(Conf.ownedLandMessage+ownersTo);
}
}
else if (SpoutFeatures.enabled() && Conf.spoutTerritoryOwnersShow)
else if (spoutClient && Conf.spoutTerritoryOwnersShow)
{
SpoutFeatures.updateOwnerList(me);
}