From 9fd3f1424818b43f87b14bc8651a98b20f3de92e Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Tue, 1 Jul 2014 10:23:22 -0700 Subject: [PATCH] Added RankUpdate command. Fixed Lobby joinable issue with server monitor. Changed server monitor to be fully dynamic for us. --- .../src/mineplex/core/INautilusPlugin.java | 16 --- .../core/account/CoreClientManager.java | 28 +++-- .../core/account/command/UpdateRank.java | 104 ++++++++++++++++++ .../account/repository/AccountRepository.java | 17 +++ .../mineplex/core/command/CommandCenter.java | 12 +- .../src/mineplex/core/portal/Portal.java | 6 +- .../enjinTranslator/EnjinTranslator.java | 10 +- .../.externalToolBuilders/Hub Builder.launch | 1 + .../Mineplex.Hub/src/mineplex/hub/Hub.java | 58 +++------- .../servermonitor/GroupStatusData.java | 6 +- .../mineplex/servermonitor/ServerMonitor.java | 14 ++- .../src/nautilus/game/arcade/Arcade.java | 53 +++------ .../Models/AccountAdministrator.cs | 2 +- Website/LOCWebsite.suo | Bin 474624 -> 474624 bytes 14 files changed, 196 insertions(+), 131 deletions(-) delete mode 100644 Plugins/Mineplex.Core/src/mineplex/core/INautilusPlugin.java create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java diff --git a/Plugins/Mineplex.Core/src/mineplex/core/INautilusPlugin.java b/Plugins/Mineplex.Core/src/mineplex/core/INautilusPlugin.java deleted file mode 100644 index 3ca85a650..000000000 --- a/Plugins/Mineplex.Core/src/mineplex/core/INautilusPlugin.java +++ /dev/null @@ -1,16 +0,0 @@ -package mineplex.core; - -import org.bukkit.Server; -import org.bukkit.plugin.PluginManager; -import org.bukkit.plugin.java.JavaPlugin; - -public interface INautilusPlugin -{ - JavaPlugin GetPlugin(); - - String GetWebServerAddress(); - - Server GetRealServer(); - - PluginManager GetPluginManager(); -} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java b/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java index a6715061c..112bf6d3f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java @@ -5,6 +5,8 @@ import java.util.Iterator; import java.util.Map.Entry; import java.util.UUID; +import mineplex.core.MiniPlugin; +import mineplex.core.account.command.UpdateRank; import mineplex.core.account.event.AsyncClientLoadEvent; import mineplex.core.account.event.ClientUnloadEvent; import mineplex.core.account.event.ClientWebResponseEvent; @@ -24,7 +26,6 @@ import org.bukkit.craftbukkit.libs.com.google.gson.Gson; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; import org.bukkit.event.player.AsyncPlayerPreLoginEvent; import org.bukkit.event.player.AsyncPlayerPreLoginEvent.Result; import org.bukkit.event.player.PlayerKickEvent; @@ -32,10 +33,8 @@ import org.bukkit.event.player.PlayerLoginEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.plugin.java.JavaPlugin; -public class CoreClientManager implements Listener +public class CoreClientManager extends MiniPlugin { - private static CoreClientManager _instance; - private JavaPlugin _plugin; private AccountRepository _repository; private NautHashMap _clientList; @@ -43,26 +42,25 @@ public class CoreClientManager implements Listener private Object _clientLock = new Object(); - protected CoreClientManager(JavaPlugin plugin, String webServer) + public CoreClientManager(JavaPlugin plugin, String webServer) { - _instance = this; + super("Client Manager", plugin); _plugin = plugin; _repository = new AccountRepository(webServer); _clientList = new NautHashMap(); _duplicateLoginGlitchPreventionList = new HashSet(); - - _plugin.getServer().getPluginManager().registerEvents(this, _plugin); } - public static CoreClientManager Initialize(JavaPlugin plugin, String webServer) + public AccountRepository getRepository() { - if (_instance == null) - { - _instance = new CoreClientManager(plugin, webServer); - } - - return _instance; + return _repository; + } + + @Override + public void AddCommands() + { + AddCommand(new UpdateRank(this)); } public CoreClient Add(String name) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java b/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java new file mode 100644 index 000000000..d8c9218bd --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java @@ -0,0 +1,104 @@ +package mineplex.core.account.command; + +import java.util.Iterator; +import java.util.List; + +import org.bukkit.ChatColor; +import org.bukkit.entity.Player; + +import mineplex.core.account.CoreClientManager; +import mineplex.core.command.CommandBase; +import mineplex.core.common.Rank; +import mineplex.core.common.util.Callback; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilPlayer; + +public class UpdateRank extends CommandBase +{ + public UpdateRank(CoreClientManager plugin) + { + super(plugin, Rank.ADMIN, "updateRank"); + } + + @Override + public void Execute(final Player caller, String[] args) + { + if (args == null) + { + UtilPlayer.message(caller, F.main(Plugin.GetName(), "/" + AliasUsed + " joeschmo MODERATOR")); + } + else + { + if (args.length == 0) + { + UtilPlayer.message(caller, F.main(Plugin.GetName(), "Player argument missing.")); + return; + } + + final String playerName = args[0]; + Rank tempRank = null; + + try + { + tempRank = Rank.valueOf(args[1]); + } + catch (Exception ex) + { + UtilPlayer.message(caller, F.main(Plugin.GetName(), ChatColor.RED + "" + ChatColor.BOLD + "Invalid rank!")); + return; + } + + final Rank rank = tempRank; + + if (rank == Rank.MODERATOR || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV) + { + Plugin.getRepository().MatchPlayerName(new Callback>() + { + public void run(List matches) + { + boolean matchedExact = false; + + for (String match : matches) + { + if (match.equalsIgnoreCase(playerName)) + { + matchedExact = true; + } + } + + if (matchedExact) + { + for (Iterator matchIterator = matches.iterator(); matchIterator.hasNext();) + { + if (!matchIterator.next().equalsIgnoreCase(playerName)) + { + matchIterator.remove(); + } + } + } + + UtilPlayer.searchOffline(matches, new Callback() + { + public void run(final String target) + { + if (target == null) + { + return; + } + + Plugin.getRepository().SaveRank(new Callback() + { + public void run(Rank rank) + { + caller.sendMessage(F.main(Plugin.GetName(), target + "'s rank has been updated to " + rank.Name + "!")); + } + }, target, rank, true); + + } + }, caller, playerName, true); + } + }, playerName); + } + } + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/account/repository/AccountRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/account/repository/AccountRepository.java index 5b83aea80..ac8e99228 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/account/repository/AccountRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/account/repository/AccountRepository.java @@ -1,7 +1,10 @@ package mineplex.core.account.repository; +import java.util.List; import java.util.UUID; +import org.bukkit.craftbukkit.libs.com.google.gson.reflect.TypeToken; + import mineplex.core.account.repository.token.LoginToken; import mineplex.core.account.repository.token.RankUpdateToken; import mineplex.core.common.Rank; @@ -37,4 +40,18 @@ public class AccountRepository new AsyncJsonWebCall(_webAddress + "PlayerAccount/RankUpdate").Execute(Rank.class, callback, token); } + + public void MatchPlayerName(final Callback> callback, final String userName) + { + Thread asyncThread = new Thread(new Runnable() + { + public void run() + { + List tokenList = new JsonWebCall(_webAddress + "PlayerAccount/GetMatches").Execute(new TypeToken>(){}.getType(), userName); + callback.run(tokenList); + } + }); + + asyncThread.start(); + } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/command/CommandCenter.java b/Plugins/Mineplex.Core/src/mineplex/core/command/CommandCenter.java index 566644146..dd3d19ed6 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/command/CommandCenter.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/command/CommandCenter.java @@ -18,10 +18,10 @@ public class CommandCenter implements Listener protected CoreClientManager ClientManager; protected NautHashMap Commands; - public static void Initialize(JavaPlugin plugin, CoreClientManager clientManager) + public static void Initialize(JavaPlugin plugin) { if (Instance == null) - Instance = new CommandCenter(plugin, clientManager); + Instance = new CommandCenter(plugin); } public CoreClientManager GetClientManager() @@ -29,14 +29,18 @@ public class CommandCenter implements Listener return ClientManager; } - private CommandCenter(JavaPlugin instance, CoreClientManager manager) + private CommandCenter(JavaPlugin instance) { Plugin = instance; - ClientManager = manager; Commands = new NautHashMap(); Plugin.getServer().getPluginManager().registerEvents(this, Plugin); } + public void setClientManager(CoreClientManager clientManager) + { + ClientManager = clientManager; + } + @EventHandler public void OnPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/portal/Portal.java b/Plugins/Mineplex.Core/src/mineplex/core/portal/Portal.java index e93e69db4..b88d7a2f2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/portal/Portal.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/portal/Portal.java @@ -39,7 +39,7 @@ public class Portal extends MiniPlugin implements PluginMessageListener private CoreClientManager _clientier; private String serverName = ""; - public Portal(JavaPlugin plugin) + public Portal(JavaPlugin plugin, CoreClientManager clientManager) { super("Portal", plugin); @@ -47,7 +47,7 @@ public class Portal extends MiniPlugin implements PluginMessageListener Bukkit.getMessenger().registerIncomingPluginChannel(GetPlugin(), "BungeeCord", this); _repository.initialize(plugin.getConfig().getBoolean("serverstatus.us")); - _clientier = CoreClientManager.Initialize(plugin, plugin.getConfig().getString("webServer")); + _clientier = clientManager; } public void SendAllPlayers(String serverName) @@ -196,6 +196,7 @@ public class Portal extends MiniPlugin implements PluginMessageListener @EventHandler public void onPreCommand(PlayerCommandPreprocessEvent e) { +/* String[] baseArgs = e.getMessage().split(" "); String command = baseArgs[0]; String[] args = new String[baseArgs.length - 1]; @@ -289,6 +290,7 @@ public class Portal extends MiniPlugin implements PluginMessageListener return; } } + */ } @Override diff --git a/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/EnjinTranslator.java b/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/EnjinTranslator.java index a37ab125b..4f70e225c 100644 --- a/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/EnjinTranslator.java +++ b/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/EnjinTranslator.java @@ -19,11 +19,13 @@ public class EnjinTranslator extends JavaPlugin getConfig().set(WEB_CONFIG, getConfig().getString(WEB_CONFIG)); saveConfig(); - //Core Modules - CoreClientManager clientManager = CoreClientManager.Initialize(this, GetWebServerAddress()); - //Static Modules - CommandCenter.Initialize(this, clientManager); + CommandCenter.Initialize(this); + + //Core Modules + CoreClientManager clientManager = new CoreClientManager(this, GetWebServerAddress()); + CommandCenter.Instance.setClientManager(clientManager); + DonationManager donationManager = new DonationManager(this, GetWebServerAddress()); //Other Modules Punish punish = new Punish(this, GetWebServerAddress(), clientManager); diff --git a/Plugins/Mineplex.Hub/.externalToolBuilders/Hub Builder.launch b/Plugins/Mineplex.Hub/.externalToolBuilders/Hub Builder.launch index 3ccc01405..66529a78c 100644 --- a/Plugins/Mineplex.Hub/.externalToolBuilders/Hub Builder.launch +++ b/Plugins/Mineplex.Hub/.externalToolBuilders/Hub Builder.launch @@ -11,6 +11,7 @@ + diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java index b18b4f583..95a929abf 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java @@ -1,6 +1,5 @@ package mineplex.hub; -import mineplex.core.INautilusPlugin; import mineplex.core.account.CoreClientManager; import mineplex.core.antihack.AntiHack; import mineplex.core.antistack.AntiStack; @@ -48,12 +47,10 @@ import mineplex.minecraft.game.core.condition.ConditionManager; import mineplex.minecraft.game.core.damage.DamageManager; import mineplex.minecraft.game.core.fire.Fire; -import org.bukkit.Server; import org.bukkit.entity.Player; -import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; -public class Hub extends JavaPlugin implements INautilusPlugin, IRelation +public class Hub extends JavaPlugin implements IRelation { private String WEB_CONFIG = "webServer"; @@ -61,24 +58,25 @@ public class Hub extends JavaPlugin implements INautilusPlugin, IRelation public void onEnable() { getConfig().addDefault(WEB_CONFIG, "http://accounts.mineplex.com/"); - getConfig().set(WEB_CONFIG, getConfig().getString(WEB_CONFIG)); saveConfig(); + String webServerAddress = getConfig().getString(WEB_CONFIG); + Logger.initialize(this); - //Core Modules - CoreClientManager clientManager = CoreClientManager.Initialize(this, GetWebServerAddress()); - //Static Modules - CommandCenter.Initialize(this, clientManager); + CommandCenter.Initialize(this); + CoreClientManager clientManager = new CoreClientManager(this, webServerAddress); + CommandCenter.Instance.setClientManager(clientManager); + ItemStackFactory.Initialize(this, false); Recharge.Initialize(this); - Punish punish = new Punish(this, GetWebServerAddress(), clientManager); - Portal portal = new Portal(this); + Punish punish = new Punish(this, webServerAddress, clientManager); + Portal portal = new Portal(this, clientManager); AntiHack.Initialize(this, punish, portal); - DonationManager donationManager = new DonationManager(this, GetWebServerAddress()); + DonationManager donationManager = new DonationManager(this, webServerAddress); //Other Modules PreferencesManager preferenceManager = new PreferencesManager(this, clientManager, donationManager); @@ -86,13 +84,13 @@ public class Hub extends JavaPlugin implements INautilusPlugin, IRelation new MessageManager(this, clientManager, preferenceManager); Creature creature = new Creature(this); NpcManager npcManager = new NpcManager(this, creature); - PetManager petManager = new PetManager(this, clientManager, donationManager, creature, GetWebServerAddress()); + PetManager petManager = new PetManager(this, clientManager, donationManager, creature, webServerAddress); new AntiStack(this); //Main Modules PacketHandler packetHandler = new PacketHandler(this); PartyManager partyManager = new PartyManager(this, clientManager, preferenceManager); - HubManager hubManager = new HubManager(this, new BlockRestore(this), clientManager, donationManager, new ConditionManager(this), new DisguiseManager(this, packetHandler), new TaskManager(this, GetWebServerAddress()), portal, partyManager, preferenceManager, petManager); + HubManager hubManager = new HubManager(this, new BlockRestore(this), clientManager, donationManager, new ConditionManager(this), new DisguiseManager(this, packetHandler), new TaskManager(this, webServerAddress), portal, partyManager, preferenceManager, petManager); ServerStatusManager serverStatusManager = new ServerStatusManager(this, new LagMeter(this, clientManager)); QueueManager queueManager = new QueueManager(this, clientManager, donationManager, new EloManager(this), partyManager); @@ -112,9 +110,9 @@ public class Hub extends JavaPlugin implements INautilusPlugin, IRelation Teleport teleport = new Teleport(this, clientManager, new Spawn(this)); Energy energy = new Energy(this); - ItemFactory itemFactory = new ItemFactory(this, blockRestore, conditionManager, damage, energy, fire, throwManager, GetWebServerAddress()); - SkillFactory skillManager = new SkillFactory(this, damage, this, combatManager, conditionManager, throwManager, blockRestore, fire, new Movement(this), teleport, energy, GetWebServerAddress()); - ClassManager classManager = new ClassManager(this, clientManager, donationManager, skillManager, itemFactory, GetWebServerAddress()); + ItemFactory itemFactory = new ItemFactory(this, blockRestore, conditionManager, damage, energy, fire, throwManager, webServerAddress); + SkillFactory skillManager = new SkillFactory(this, damage, this, combatManager, conditionManager, throwManager, blockRestore, fire, new Movement(this), teleport, energy, webServerAddress); + ClassManager classManager = new ClassManager(this, clientManager, donationManager, skillManager, itemFactory, webServerAddress); ClassShopManager shopManager = new ClassShopManager(this, classManager, skillManager, itemFactory); @@ -133,32 +131,6 @@ public class Hub extends JavaPlugin implements INautilusPlugin, IRelation { } - - @Override - public JavaPlugin GetPlugin() - { - return this; - } - - @Override - public String GetWebServerAddress() - { - String webServerAddress = getConfig().getString(WEB_CONFIG); - - return webServerAddress; - } - - @Override - public Server GetRealServer() - { - return getServer(); - } - - @Override - public PluginManager GetPluginManager() - { - return GetRealServer().getPluginManager(); - } @Override public boolean CanHurt(Player a, Player b) diff --git a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/GroupStatusData.java b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/GroupStatusData.java index 609168df9..145399fce 100644 --- a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/GroupStatusData.java +++ b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/GroupStatusData.java @@ -44,7 +44,7 @@ public class GroupStatusData // Lobby joinable checking if (existingServer.Motd.isEmpty() || existingServer.Motd.equals("")) { - if (existingServer.Players / existingServer.MaxPlayers < 10) + if (serverStatusData.MaxPlayers - serverStatusData.Players > 15) _joinableCount--; } else @@ -66,8 +66,10 @@ public class GroupStatusData // Lobby joinable checking if (serverStatusData.Motd.isEmpty() || serverStatusData.Motd.equals("")) { - if (serverStatusData.Players / serverStatusData.MaxPlayers < 10) + if (serverStatusData.MaxPlayers - serverStatusData.Players > 15) + { _joinableCount++; + } } else { diff --git a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java index 56ba4a52e..45746e3ef 100644 --- a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java +++ b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java @@ -15,6 +15,7 @@ import java.util.Map.Entry; public class ServerMonitor { + private static boolean _us = true; private static Repository _repository = new Repository(); private static int _count = 0; private static HashSet _processes = new HashSet(); @@ -22,9 +23,9 @@ public class ServerMonitor public static void main (String args[]) { - boolean us = !new File("eu.dat").exists(); + _us = !new File("eu.dat").exists(); - _repository.initialize(us); + _repository.initialize(_us); HashMap> serverTracker = new HashMap>(); while (true) @@ -34,6 +35,7 @@ public class ServerMonitor for (ServerStatusData statusData : _repository.retrieveOldServerStatuses()) { + /* if (us) { if (!serverTracker.containsKey(statusData.Name)) @@ -48,9 +50,12 @@ public class ServerMonitor } } else - killServer(statusData); + */ + + killServer(statusData); } + /* if (us) { // Remove successfully restarted US servers @@ -65,6 +70,7 @@ public class ServerMonitor } else { + */ List dynamicServers = new ArrayList(_repository.retrieveDynamicServers()); if (_count % 15 == 0) @@ -165,7 +171,7 @@ public class ServerMonitor serversToKill--; } } - } + //} int processWaits = 0; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java index 02f6069f8..c32faf13b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java @@ -8,7 +8,6 @@ import java.io.FileInputStream; import java.io.FileWriter; import java.io.InputStreamReader; -import mineplex.core.INautilusPlugin; import mineplex.core.account.CoreClientManager; import mineplex.core.antihack.AntiHack; import mineplex.core.antistack.AntiStack; @@ -39,12 +38,10 @@ import mineplex.minecraft.game.core.combat.CombatManager; import mineplex.minecraft.game.core.damage.DamageManager; import nautilus.game.arcade.game.GameServerConfig; -import org.bukkit.Server; import org.bukkit.entity.Player; -import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; -public class Arcade extends JavaPlugin implements INautilusPlugin +public class Arcade extends JavaPlugin { private String WEB_CONFIG = "webServer"; @@ -64,28 +61,31 @@ public class Arcade extends JavaPlugin implements INautilusPlugin //Configs getConfig().addDefault(WEB_CONFIG, "http://accounts.mineplex.com/"); getConfig().set(WEB_CONFIG, getConfig().getString(WEB_CONFIG)); - saveConfig(); + saveConfig(); + + String webServerAddress = getConfig().getString(WEB_CONFIG); Logger.initialize(this); - _clientManager = CoreClientManager.Initialize(this, GetWebServerAddress()); - - CommandCenter.Initialize(this, _clientManager); + //Static Modules + CommandCenter.Initialize(this); + CoreClientManager clientManager = new CoreClientManager(this, webServerAddress); + CommandCenter.Instance.setClientManager(clientManager); ItemStackFactory.Initialize(this, false); Recharge.Initialize(this); - _donationManager = new DonationManager(this, GetWebServerAddress()); + _donationManager = new DonationManager(this, webServerAddress); PreferencesManager preferenceManager = new PreferencesManager(this, _clientManager, _donationManager); new MessageManager(this, _clientManager, preferenceManager); AntiStack antistack = new AntiStack(this); - + Portal portal = new Portal(this, clientManager); Creature creature = new Creature(this); Spawn spawn = new Spawn(this); Teleport teleport = new Teleport(this, _clientManager, spawn); - new FileUpdater(this, new Portal(this)); + new FileUpdater(this, portal); ServerStatusManager serverStatusManager = new ServerStatusManager(this, new LagMeter(this, _clientManager)); PacketHandler packetHandler = new PacketHandler(this); @@ -93,12 +93,11 @@ public class Arcade extends JavaPlugin implements INautilusPlugin _damageManager = new DamageManager(this, new CombatManager(this), new NpcManager(this, creature), disguiseManager); - Portal portal = new Portal(this); - Punish punish = new Punish(this, GetWebServerAddress(), _clientManager); + Punish punish = new Punish(this, webServerAddress, _clientManager); AntiHack.Initialize(this, punish, portal); //Arcade Manager - _gameManager = new ArcadeManager(this, serverStatusManager, ReadServerConfig(), _clientManager, _donationManager, _damageManager, disguiseManager, creature, teleport, new Blood(this), antistack, portal, packetHandler, preferenceManager, GetWebServerAddress()); + _gameManager = new ArcadeManager(this, serverStatusManager, ReadServerConfig(), _clientManager, _donationManager, _damageManager, disguiseManager, creature, teleport, new Blood(this), antistack, portal, packetHandler, preferenceManager, webServerAddress); new MemoryFix(this); @@ -250,30 +249,4 @@ public class Arcade extends JavaPlugin implements INautilusPlugin System.out.println("Deleted Old Game: " + file.getName()); } } - - @Override - public JavaPlugin GetPlugin() - { - return this; - } - - @Override - public String GetWebServerAddress() - { - String webServerAddress = getConfig().getString(WEB_CONFIG); - - return webServerAddress; - } - - @Override - public Server GetRealServer() - { - return getServer(); - } - - @Override - public PluginManager GetPluginManager() - { - return GetRealServer().getPluginManager(); - } } diff --git a/Website/LOC.Website.Common/Models/AccountAdministrator.cs b/Website/LOC.Website.Common/Models/AccountAdministrator.cs index dd218fd49..82ff2b519 100644 --- a/Website/LOC.Website.Common/Models/AccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/AccountAdministrator.cs @@ -511,7 +511,7 @@ repository.CommitChanges(); - return rank.ToString(); + return rank.Name; } } diff --git a/Website/LOCWebsite.suo b/Website/LOCWebsite.suo index 9f62e8a48b5b783c529d1f3f4d74a0395c3df0fb..cf0756081a83bfa4d5b33b8199194cd28bfb7e95 100644 GIT binary patch delta 138 zcmZqpBh&ClW