From 6048c97b521877218c66dbab66ba87d3bbe42ba8 Mon Sep 17 00:00:00 2001 From: Joseph Prezioso Jr Date: Tue, 29 Mar 2016 17:50:06 -0400 Subject: [PATCH] Tweaks to clean/clarify things --- .../Mineplex.Core/src/mineplex/core/elo/EloManager.java | 2 -- .../Mineplex.Core/src/mineplex/core/elo/EloPlayer.java | 5 +++++ .../Mineplex.Core/src/mineplex/core/elo/EloSettings.java | 8 ++++---- .../Mineplex.Core/src/mineplex/core/game/GameDisplay.java | 4 ++++ .../src/nautilus/game/arcade/game/Game.java | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloManager.java b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloManager.java index 7c9a35c47..664947480 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloManager.java @@ -81,8 +81,6 @@ public class EloManager extends MiniDbClientPlugin return CalculateDivision(percentile); } - //CalculateDivision copied from EloDivision for testing purposes - //will remove/alter one or both of them as needed public String CalculateDivision(double divPercent) { if (divPercent == 100) return "Diamond"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloPlayer.java b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloPlayer.java index 61c8ad014..24448c7e1 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloPlayer.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloPlayer.java @@ -13,4 +13,9 @@ public class EloPlayer System.out.println(UniqueId + "'s elo is " + Rating); } + public void setDivision(String newDivision) + { + _division = newDivision; + } + } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloSettings.java b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloSettings.java index f392b2c44..7768adc25 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloSettings.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloSettings.java @@ -13,18 +13,18 @@ public class EloSettings { public int getEloSetting() { - int settingEnum = 0; + int settingNum = 0; if(_backendElo) { - settingEnum = 1; + settingNum = 1; } else if (_fullElo) { - settingEnum = 2; + settingNum = 2; } - return settingEnum; + return settingNum; } public void setEloSetting(int newSetting) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/game/GameDisplay.java b/Plugins/Mineplex.Core/src/mineplex/core/game/GameDisplay.java index ac497cd48..55cbc264f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/game/GameDisplay.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/game/GameDisplay.java @@ -3,6 +3,8 @@ package mineplex.core.game; import org.bukkit.DyeColor; import org.bukkit.Material; +import mineplex.core.elo.EloSettings; + public enum GameDisplay { //Mini @@ -88,6 +90,8 @@ public enum GameDisplay private int _gameId; // Unique identifying id for this gamemode (used for statistics) public int getGameId() { return _gameId; } + private EloSettings EloSetting = new EloSettings(0); + GameDisplay(String name, Material mat, byte data, GameCategory gameCategory, int gameId) { this(name, name, mat, data, gameCategory, gameId); 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 c0ced89b7..3ff44040b 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 @@ -316,7 +316,7 @@ public abstract class Game implements Listener public String Winner = "Nobody"; public GameTeam WinnerTeam = null; - //EloSetting - experimental + //EloSetting - experimental (0 = disabled, 1 = background, 2 = full) public EloSettings EloSetting = new EloSettings(0); public boolean EloRanking = false;