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:
parent
d7a2a88f95
commit
358186764d
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user