Wipe personal server groups on restart of monitor.
Cleanup of unused code.
This commit is contained in:
parent
eb16cd755a
commit
ab20d35917
@ -205,16 +205,6 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
|||||||
((Villager) pet).setBaby();
|
((Villager) pet).setBaby();
|
||||||
((Villager) pet).setAgeLock(true);
|
((Villager) pet).setAgeLock(true);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
else if (pet instanceof Sheep)
|
|
||||||
{
|
|
||||||
DisguiseWither disguise = new DisguiseWither(pet);
|
|
||||||
disguise.s(350);
|
|
||||||
|
|
||||||
_disguiseManager.disguise(disguise);
|
|
||||||
UtilEnt.silence(pet, true);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
_activePetOwners.put(player.getName(), pet);
|
_activePetOwners.put(player.getName(), pet);
|
||||||
_failedAttempts.put(player.getName(), 0);
|
_failedAttempts.put(player.getName(), 0);
|
||||||
|
@ -19,11 +19,6 @@ public class PetRepository
|
|||||||
_webAddress = webAddress;
|
_webAddress = webAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<PetSalesToken> GetPets(List<PetSalesToken> petTokens)
|
|
||||||
{
|
|
||||||
return new JsonWebCall(_webAddress + "Pets/GetPets").Execute(new TypeToken<List<PetSalesToken>>(){}.getType(), petTokens);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddPet(PetChangeToken token)
|
public void AddPet(PetChangeToken token)
|
||||||
{
|
{
|
||||||
new AsyncJsonWebCall(_webAddress + "Pets/AddPet").Execute(token);
|
new AsyncJsonWebCall(_webAddress + "Pets/AddPet").Execute(token);
|
||||||
@ -43,14 +38,4 @@ public class PetRepository
|
|||||||
{
|
{
|
||||||
new AsyncJsonWebCall(_webAddress + "Pets/UpdatePet").Execute(token);
|
new AsyncJsonWebCall(_webAddress + "Pets/UpdatePet").Execute(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddPetNameTag(String name)
|
|
||||||
{
|
|
||||||
new AsyncJsonWebCall(_webAddress + "Pets/AddPetNameTag").Execute(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemovePetNameTag(String name)
|
|
||||||
{
|
|
||||||
new AsyncJsonWebCall(_webAddress + "Pets/RemovePetNameTag").Execute(name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -180,9 +180,26 @@ public class ServerMonitor
|
|||||||
log("Saved Dedicated Server Stats.");
|
log("Saved Dedicated Server Stats.");
|
||||||
_historyRepository.saveServerGroupStats((int)totalCPU, (int)totalRAM, _serverGroupMap.values());
|
_historyRepository.saveServerGroupStats((int)totalCPU, (int)totalRAM, _serverGroupMap.values());
|
||||||
log("Saved ServerGroup Stats.");
|
log("Saved ServerGroup Stats.");
|
||||||
//_historyRepository.saveNetworkStats(usedCpuPercent, usedRamPercent, availableCPU, availableRAM, _region);
|
_historyRepository.saveNetworkStats(usedCpuPercent, usedRamPercent, availableCPU, availableRAM, _region);
|
||||||
log("Saved Network Stats.");
|
log("Saved Network Stats.");
|
||||||
|
|
||||||
|
if (_count == 0)
|
||||||
|
{
|
||||||
|
for (Iterator<ServerGroup> groupStatusIterator = _serverGroups.iterator(); groupStatusIterator.hasNext();)
|
||||||
|
{
|
||||||
|
ServerGroup groupStatus = groupStatusIterator.next();
|
||||||
|
|
||||||
|
if (groupStatus.getServerType().equalsIgnoreCase("Player"))
|
||||||
|
{
|
||||||
|
_repository.removeServerGroup(groupStatus);
|
||||||
|
_serverGroupMap.remove(groupStatus);
|
||||||
|
groupStatusIterator.remove();
|
||||||
|
|
||||||
|
System.out.println("Removed MPS : " + groupStatus.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (ServerGroup groupStatus : _serverGroups)
|
for (ServerGroup groupStatus : _serverGroups)
|
||||||
{
|
{
|
||||||
NautHashMap<Integer, MinecraftServer> serverMap = new NautHashMap<Integer, MinecraftServer>();
|
NautHashMap<Integer, MinecraftServer> serverMap = new NautHashMap<Integer, MinecraftServer>();
|
||||||
|
Loading…
Reference in New Issue
Block a user