Added ultra tag in hub.

This commit is contained in:
Jonathan Williams 2013-09-09 17:17:55 -07:00
parent 645ae4cad8
commit 0f577c3f8c
2 changed files with 31 additions and 7 deletions

View File

@ -43,6 +43,11 @@ public class Donor
{
return _salesPackagesOwned;
}
public List<String> GetUnknownSalesPackagesOwned()
{
return _unknownSalesPackagesOwned;
}
public boolean Owns(Integer salesPackageId)
{
@ -104,4 +109,15 @@ public class Donor
{
_unknownSalesPackagesOwned.add(packageName);
}
public boolean OwnsUltraPackage()
{
for (String packageName : _unknownSalesPackagesOwned)
{
if (packageName.contains("ULTRA"))
return true;
}
return false;
}
}

View File

@ -284,17 +284,25 @@ public class HubManager extends MiniClientPlugin<HubClient>
for (Player otherPlayer : Bukkit.getOnlinePlayers())
{
String rankName = _clientManager.Get(player).GetRank().Name;
String otherRankName = _clientManager.Get(player).GetRank().Name;
if (!_clientManager.Get(player).GetRank().Has(Rank.ULTRA) && _donationManager.Get(player.getName()).OwnsUltraPackage())
{
rankName = Rank.ULTRA.Name;
}
if (!_clientManager.Get(otherPlayer).GetRank().Has(Rank.ULTRA) && _donationManager.Get(otherPlayer.getName()).OwnsUltraPackage())
{
otherRankName = Rank.ULTRA.Name;
}
//Add Other to Self
board.getTeam(_clientManager.Get(otherPlayer).GetRank().Name).addPlayer(otherPlayer);
board.getTeam(otherRankName).addPlayer(otherPlayer);
//Add Self to Other
otherPlayer.getScoreboard().getTeam(_clientManager.Get(player).GetRank().Name).addPlayer(player);
otherPlayer.getScoreboard().getTeam(rankName).addPlayer(player);
}
board.getTeam(Rank.OWNER.Name).addPlayer(Bukkit.getOfflinePlayer("Chiss"));
board.getTeam(Rank.OWNER.Name).addPlayer(Bukkit.getOfflinePlayer("defek7"));
board.getTeam(Rank.OWNER.Name).addPlayer(Bukkit.getOfflinePlayer("Spu_"));
board.getTeam(Rank.OWNER.Name).addPlayer(Bukkit.getOfflinePlayer("sterling_"));
}
@EventHandler