From ddd1c5af9b83dabec0199094da801d9e113709c1 Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Fri, 22 Apr 2016 03:10:09 -0500 Subject: [PATCH] Removed EloSettings and fixed scoreboard. --- .../src/mineplex/core/elo/EloSettings.java | 57 ------------------- .../src/nautilus/game/arcade/game/Game.java | 3 - .../game/games/champions/ChampionsCTF.java | 1 - .../games/champions/ChampionsDominate.java | 1 - .../game/games/champions/ChampionsTDM.java | 2 - .../arcade/game/games/common/Domination.java | 2 - .../game/games/turfforts/TurfForts.java | 2 - .../arcade/managers/GameLobbyManager.java | 22 ++----- 8 files changed, 5 insertions(+), 85 deletions(-) delete mode 100644 Plugins/Mineplex.Core/src/mineplex/core/elo/EloSettings.java diff --git a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloSettings.java b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloSettings.java deleted file mode 100644 index 7768adc25..000000000 --- a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloSettings.java +++ /dev/null @@ -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; - - } - } - -} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java index 73c1e2025..f590ef33a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java @@ -57,7 +57,6 @@ import mineplex.core.common.util.UtilTextMiddle; import mineplex.core.common.util.UtilTime; import mineplex.core.disguise.disguises.DisguisePlayer; import mineplex.core.elo.EloPlayer; -import mineplex.core.elo.EloSettings; import mineplex.core.elo.EloTeam; import mineplex.core.elo.GameResult; import mineplex.core.itemstack.ItemBuilder; @@ -316,8 +315,6 @@ public abstract class Game implements Listener public GameTeam WinnerTeam = null; //ELO - //EloSetting - (0 = disabled, 1 = background, 2 = full) - public EloSettings EloSetting = new EloSettings(0); public boolean EloRanking = false; public int EloStart = 1000; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsCTF.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsCTF.java index c2633e3b4..fbe9a5428 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsCTF.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsCTF.java @@ -71,7 +71,6 @@ public class ChampionsCTF extends CaptureTheFlag InventoryOpenChest = true; - EloRanking = false; EloStart = 1000; this.DontAllowOverfill = true; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsDominate.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsDominate.java index 83b44d9de..f8583deec 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsDominate.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsDominate.java @@ -66,7 +66,6 @@ public class ChampionsDominate extends Domination InventoryOpenChest = true; - EloRanking = false; EloStart = 1000; this.DontAllowOverfill = true; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsTDM.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsTDM.java index 6fc89b933..3f6441659 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsTDM.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions/ChampionsTDM.java @@ -66,8 +66,6 @@ public class ChampionsTDM extends TeamDeathmatch this.StrictAntiHack = true; InventoryOpenChest = true; - this.EloRanking = true; - this.EloSetting.setEloSetting(2); this.DisableKillCommand = false; this.DontAllowOverfill = true; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/Domination.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/Domination.java index f8b287a10..55a56367f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/Domination.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/common/Domination.java @@ -86,8 +86,6 @@ public class Domination extends TeamGame this.WorldTimeSet = 2000; this.DeathSpectateSecs = 10; - this.EloRanking = true; - this.EloSetting.setEloSetting(2); //this.QuitOut = false; } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java index d633334e6..e90c94eec 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java @@ -153,8 +153,6 @@ public class TurfForts extends TeamGame this.ItemPickup = false; this.DamageSelf = false; this.DeathSpectateSecs = 4; - this.EloRanking = true; - this.EloSetting.setEloSetting(2); _breakStatTracker = new BlockBreakStatTracker(this, false); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java index 11e2e8c6b..5f7a4612f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java @@ -1129,29 +1129,17 @@ public class GameLobbyManager implements Listener objective.getScore(Manager.GetDonation().Get(entry.getKey().getName()).GetGems() + " ").setScore(line--); _gemMap.put(entry.getKey(), Manager.GetDonation().Get(entry.getKey().getName()).GetGems()); - objective.getScore(" ").setScore(line--); //Server objective.getScore(" ").setScore(line--); objective.getScore(C.cAqua + C.Bold + "Server").setScore(line--); objective.getScore(_serverName).setScore(line--); - objective.getScore(" ").setScore(line--); - - //ELO -- only when full display is set properly - if (Manager.GetGame() != null && Manager.GetGame().EloRanking && Manager.GetGame().EloSetting.getEloSetting() == 2) + + // ELO DIVISION + if (Manager.GetGame() != null && Manager.GetGame().EloRanking) { - objective.getScore(C.cPurple + C.Bold + "Elo").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--); + objective.getScore(" ").setScore(line--); + objective.getScore(C.cPurpleB + C.Bold + "Division").setScore(line--); // Remove old entry.getValue().resetScores(_divisionMap.get(entry.getKey()) + " ");