More work

This commit is contained in:
Shaun Bennett 2015-12-10 21:32:10 -05:00
parent ffd4658740
commit d6aed5dff7
3 changed files with 9 additions and 8 deletions

View File

@ -64,7 +64,7 @@ public class PlayerCountManager extends MiniPlugin
@EventHandler
public void refresh(UpdateEvent event)
{
if (event.getType() != UpdateType.SEC)
if (event.getType() != UpdateType.SLOW)
return;
runAsync(this::updatePlayerCount);

View File

@ -112,7 +112,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
List<String> christmasLore = new ArrayList<String>();
christmasLore.add(" ");
christmasLore.add(F.value("Christmas Chests Owned", "" + christmasCount));
christmasLore.add(F.value("Winter Holiday Chests Owned", "" + christmasCount));
christmasLore.add(" ");
christmasLore.add(C.cGray + "All our previous adventurers have");
christmasLore.add(C.cGray + "perished in search of these chests.");

View File

@ -55,6 +55,7 @@ import mineplex.core.party.Party;
import mineplex.core.party.PartyManager;
import mineplex.core.personalServer.PersonalServerManager;
import mineplex.core.pet.PetManager;
import mineplex.core.playerCount.PlayerCountManager;
import mineplex.core.poll.PollManager;
import mineplex.core.portal.Portal;
import mineplex.core.preferences.PreferencesManager;
@ -157,6 +158,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
private PetManager _petManager;
private PacketHandler _packetHandler;
private PersonalServerManager _personalServerManager;
private PlayerCountManager _playerCountManager;
// private HalloweenSpookinessManager _halloweenManager;
// private TrickOrTreatManager _trickOrTreatManager;
@ -246,6 +248,8 @@ public class HubManager extends MiniClientPlugin<HubClient>
// NotificationManager notificationManager = new NotificationManager(plugin, clientManager, donationManager);
// new MailManager(_plugin, notificationManager);
_playerCountManager = new PlayerCountManager(plugin);
_songs = new ArrayList<NoteSong>();
try
@ -729,14 +733,11 @@ public class HubManager extends MiniClientPlugin<HubClient>
obj.getScore(" ").setScore(line--);
//Players
int playerCount = _playerCountManager.getPlayerCount();
obj.getScore(C.cYellow + C.Bold + "Players").setScore(line--);
player.getScoreboard().resetScores(_lastPlayerCount + "");
_lastPlayerCount++;
obj.getScore(_lastPlayerCount + "").setScore(line--);
obj.getScore(playerCount + "").setScore(line--);
_lastPlayerCount = playerCount;
//Space
obj.getScore(" ").setScore(line--);