Removed EloSettings and fixed scoreboard.

This commit is contained in:
Jonathan Williams 2016-04-22 03:10:09 -05:00
parent 34f94c0381
commit ddd1c5af9b
8 changed files with 5 additions and 85 deletions

View File

@ -1,57 +0,0 @@
package mineplex.core.elo;
public class EloSettings {
private boolean _fullElo = false;
private boolean _backendElo = false;
private boolean _eloDisabled = true;
public EloSettings(int setElo)
{
setEloSetting(setElo);
}
public int getEloSetting()
{
int settingNum = 0;
if(_backendElo)
{
settingNum = 1;
}
else if (_fullElo)
{
settingNum = 2;
}
return settingNum;
}
public void setEloSetting(int newSetting)
{
switch(newSetting)
{
case 0:
_fullElo = false;
_backendElo = false;
_eloDisabled = true;
break;
case 1:
_fullElo = false;
_backendElo = true;
_eloDisabled = false;
break;
case 2:
_fullElo = true;
_backendElo = false;
_eloDisabled = false;
break;
default:
_fullElo = false;
_backendElo = false;
_eloDisabled = true;
}
}
}

View File

@ -57,7 +57,6 @@ import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
import mineplex.core.disguise.disguises.DisguisePlayer; import mineplex.core.disguise.disguises.DisguisePlayer;
import mineplex.core.elo.EloPlayer; import mineplex.core.elo.EloPlayer;
import mineplex.core.elo.EloSettings;
import mineplex.core.elo.EloTeam; import mineplex.core.elo.EloTeam;
import mineplex.core.elo.GameResult; import mineplex.core.elo.GameResult;
import mineplex.core.itemstack.ItemBuilder; import mineplex.core.itemstack.ItemBuilder;
@ -316,8 +315,6 @@ public abstract class Game implements Listener
public GameTeam WinnerTeam = null; public GameTeam WinnerTeam = null;
//ELO //ELO
//EloSetting - (0 = disabled, 1 = background, 2 = full)
public EloSettings EloSetting = new EloSettings(0);
public boolean EloRanking = false; public boolean EloRanking = false;
public int EloStart = 1000; public int EloStart = 1000;

View File

@ -71,7 +71,6 @@ public class ChampionsCTF extends CaptureTheFlag
InventoryOpenChest = true; InventoryOpenChest = true;
EloRanking = false;
EloStart = 1000; EloStart = 1000;
this.DontAllowOverfill = true; this.DontAllowOverfill = true;

View File

@ -66,7 +66,6 @@ public class ChampionsDominate extends Domination
InventoryOpenChest = true; InventoryOpenChest = true;
EloRanking = false;
EloStart = 1000; EloStart = 1000;
this.DontAllowOverfill = true; this.DontAllowOverfill = true;

View File

@ -66,8 +66,6 @@ public class ChampionsTDM extends TeamDeathmatch
this.StrictAntiHack = true; this.StrictAntiHack = true;
InventoryOpenChest = true; InventoryOpenChest = true;
this.EloRanking = true;
this.EloSetting.setEloSetting(2);
this.DisableKillCommand = false; this.DisableKillCommand = false;
this.DontAllowOverfill = true; this.DontAllowOverfill = true;

View File

@ -86,8 +86,6 @@ public class Domination extends TeamGame
this.WorldTimeSet = 2000; this.WorldTimeSet = 2000;
this.DeathSpectateSecs = 10; this.DeathSpectateSecs = 10;
this.EloRanking = true;
this.EloSetting.setEloSetting(2);
//this.QuitOut = false; //this.QuitOut = false;
} }

View File

@ -153,8 +153,6 @@ public class TurfForts extends TeamGame
this.ItemPickup = false; this.ItemPickup = false;
this.DamageSelf = false; this.DamageSelf = false;
this.DeathSpectateSecs = 4; this.DeathSpectateSecs = 4;
this.EloRanking = true;
this.EloSetting.setEloSetting(2);
_breakStatTracker = new BlockBreakStatTracker(this, false); _breakStatTracker = new BlockBreakStatTracker(this, false);

View File

@ -1129,29 +1129,17 @@ public class GameLobbyManager implements Listener
objective.getScore(Manager.GetDonation().Get(entry.getKey().getName()).GetGems() + " ").setScore(line--); objective.getScore(Manager.GetDonation().Get(entry.getKey().getName()).GetGems() + " ").setScore(line--);
_gemMap.put(entry.getKey(), Manager.GetDonation().Get(entry.getKey().getName()).GetGems()); _gemMap.put(entry.getKey(), Manager.GetDonation().Get(entry.getKey().getName()).GetGems());
objective.getScore(" ").setScore(line--);
//Server //Server
objective.getScore(" ").setScore(line--); objective.getScore(" ").setScore(line--);
objective.getScore(C.cAqua + C.Bold + "Server").setScore(line--); objective.getScore(C.cAqua + C.Bold + "Server").setScore(line--);
objective.getScore(_serverName).setScore(line--); objective.getScore(_serverName).setScore(line--);
objective.getScore(" ").setScore(line--);
// ELO DIVISION
//ELO -- only when full display is set properly if (Manager.GetGame() != null && Manager.GetGame().EloRanking)
if (Manager.GetGame() != null && Manager.GetGame().EloRanking && Manager.GetGame().EloSetting.getEloSetting() == 2)
{ {
objective.getScore(C.cPurple + C.Bold + "Elo").setScore(line--); objective.getScore(" ").setScore(line--);
objective.getScore(C.cPurpleB + C.Bold + "Division").setScore(line--);
// Remove old
entry.getValue().resetScores(_eloMap.get(entry.getKey()) + " ");
objective.getScore(Manager.getEloManager().getElo(entry.getKey(), Manager.GetGame().GetType().getGameId()) + " ").setScore(line--);
}
//ELO DIVISION
if (Manager.GetGame() != null && Manager.GetGame().EloRanking && Manager.GetGame().EloSetting.getEloSetting() >= 1)
{
objective.getScore(C.cDPurpleB + C.Bold + "Division").setScore(line--);
// Remove old // Remove old
entry.getValue().resetScores(_divisionMap.get(entry.getKey()) + " "); entry.getValue().resetScores(_divisionMap.get(entry.getKey()) + " ");