REMOVED owned plots
This commit is contained in:
@ -89,30 +89,6 @@ public class SpoutFeatures
|
||||
return mainListener.updateTerritoryDisplay(player, true);
|
||||
}
|
||||
|
||||
// update owner list for all players inside a specified chunk; if specified chunk is null, then simply update everyone online
|
||||
public static void updateOwnerListLoc(FLocation fLoc)
|
||||
{
|
||||
if (!enabled())
|
||||
return;
|
||||
|
||||
Set<FPlayer> players = FPlayers.i.getOnline();
|
||||
|
||||
for (FPlayer player : players)
|
||||
{
|
||||
if (fLoc == null || player.getLastStoodAt().equals(fLoc))
|
||||
mainListener.updateOwnerList(player);
|
||||
}
|
||||
}
|
||||
|
||||
// update owner list for specified player
|
||||
public static void updateOwnerList(FPlayer player)
|
||||
{
|
||||
if (!enabled())
|
||||
return;
|
||||
|
||||
mainListener.updateOwnerList(player);
|
||||
}
|
||||
|
||||
public static void playerDisconnect(FPlayer player)
|
||||
{
|
||||
if (!enabled())
|
||||
|
@ -58,20 +58,6 @@ public class SpoutMainListener extends SpoutListener
|
||||
return true;
|
||||
}
|
||||
|
||||
public void updateOwnerList(FPlayer player)
|
||||
{
|
||||
SpoutPlayer sPlayer = SpoutManager.getPlayer(player.getPlayer());
|
||||
if (!sPlayer.isSpoutCraftEnabled() || (Conf.spoutTerritoryDisplaySize <= 0 && ! Conf.spoutTerritoryNoticeShow))
|
||||
return;
|
||||
|
||||
FLocation here = new FLocation(player);
|
||||
Faction factionHere = Board.getFactionAt(here);
|
||||
|
||||
doOwnerList(player, sPlayer, here, factionHere);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public void removeTerritoryLabels(String playerName)
|
||||
{
|
||||
territoryLabels.remove(playerName);
|
||||
@ -146,46 +132,7 @@ public class SpoutMainListener extends SpoutListener
|
||||
label.resetNotice();
|
||||
label.setDirty(true);
|
||||
}
|
||||
|
||||
// and owner list, of course
|
||||
doOwnerList(player, sPlayer, here, factionHere);
|
||||
}
|
||||
|
||||
private void doOwnerList(FPlayer player, SpoutPlayer sPlayer, FLocation here, Faction factionHere)
|
||||
{
|
||||
// ----------
|
||||
// Owner list
|
||||
// ----------
|
||||
if (Conf.spoutTerritoryDisplayPosition > 0 && Conf.spoutTerritoryDisplaySize > 0 && Conf.spoutTerritoryOwnersShow && Conf.ownedAreasEnabled)
|
||||
{
|
||||
GenericLabel label;
|
||||
if (ownerLabels.containsKey(player.getName()))
|
||||
label = ownerLabels.get(player.getName());
|
||||
else
|
||||
{
|
||||
label = new GenericLabel();
|
||||
label.setScale(Conf.spoutTerritoryDisplaySize);
|
||||
label.setY((int)(10 * Conf.spoutTerritoryDisplaySize));
|
||||
sPlayer.getMainScreen().attachWidget(P.p, label);
|
||||
ownerLabels.put(player.getName(), label);
|
||||
}
|
||||
|
||||
String msg = "";
|
||||
|
||||
if (player.getFaction() == factionHere)
|
||||
{
|
||||
msg = factionHere.getOwnerListString(here);
|
||||
|
||||
if (!msg.isEmpty())
|
||||
msg = Conf.ownedLandMessage + msg;
|
||||
}
|
||||
|
||||
label.setText(msg);
|
||||
alignLabel(label, msg);
|
||||
label.setDirty(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// this is only necessary because Spout text size scaling is currently bugged and breaks their built-in alignment methods
|
||||
public void alignLabel(GenericLabel label, String text)
|
||||
|
Reference in New Issue
Block a user