From 526ca42add4cebae8c10fa3ac3663753125b30aa Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Wed, 27 Aug 2014 12:48:24 -0700 Subject: [PATCH 01/14] Fixed Gem booster problem. FIxed stat problem. --- .../Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java | 2 +- .../src/nautilus/game/arcade/game/Game.java | 1 - .../src/nautilus/game/arcade/stats/StatTracker.java | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java index 7ce56efee..301278497 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java @@ -66,7 +66,7 @@ public class Menu extends ShopPageBase @Override public void ClickedLeft(Player player) { - if (Shop.getBoosterEnabled()) + if (Shop.getBoosterEnabled() && Plugin.getInventoryManager().Get(Player).getItemCount("Gem Booster") > 0) { ActivateGemBoosterEvent boosterEvent = new ActivateGemBoosterEvent(player); Bukkit.getServer().getPluginManager().callEvent(boosterEvent); 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 b79839c7f..f99837be1 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 @@ -1076,7 +1076,6 @@ public abstract class Game implements Listener Announce(F.elem(player.getName()) + " used a " + F.elem(C.cGreen + "Gem Booster") + " for " + F.elem("+" + (100-(GemBoosters.size()*25)) + "% Gems") + "!"); GemBoosters.add(player.getName()); - Manager.getInventoryManager().addItemToInventory(player, "Utility", "Gem Booster", -1); } public double GetGemBoostAmount() diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/StatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/StatTracker.java index 1c7630a6c..35ee8b797 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/StatTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/StatTracker.java @@ -27,6 +27,6 @@ public class StatTracker implements Listener public void addStat(Player player, String stat, int value, boolean limitTo1, boolean global) { if (canAddStats()) - addStat(player, stat, value, limitTo1, global); + getGame().AddStat(player, stat, value, limitTo1, global); } } From ec4cb91a1c26151de39865e5bd4feb37b0c6f144 Mon Sep 17 00:00:00 2001 From: Chiss Date: Thu, 28 Aug 2014 11:50:09 +1000 Subject: [PATCH 02/14] Poll changes Achievement output double space fix --- Plugins/Mineplex.Hub/src/mineplex/hub/HubClient.java | 2 +- .../Mineplex.Hub/src/mineplex/hub/poll/PollManager.java | 4 ++-- .../src/mineplex/hub/poll/command/PollCommand.java | 4 ++-- .../game/arcade/managers/GameAchievementManager.java | 7 ++++++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubClient.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubClient.java index 3742307ab..9b251ecb2 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubClient.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubClient.java @@ -10,7 +10,7 @@ public class HubClient public String PurchaseString = " Purchase Ultra Rank at mineplex.com to unlock all game benefits!"; public int PurchaseIndex = 0; - + public String UltraString = " Thank you for your support!"; public int UltraIndex = 0; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollManager.java index e3d47524c..937497aec 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollManager.java @@ -119,7 +119,7 @@ public class PollManager extends MiniClientPlugin { String[] answers = poll.getAnswers(); - player.sendMessage(C.cGold + C.Bold + "-----------" + C.cYellow + C.Bold + "POLL" + C.cGold + C.Bold + "-----------"); + player.sendMessage(C.cGold + C.Bold + "--------------" + C.cYellow + C.Bold + "POLL" + C.cGold + C.Bold + "--------------"); player.sendMessage(poll.getQuestion()); player.sendMessage(""); for (int i = 1; i <= answers.length; i++) @@ -151,7 +151,7 @@ public class PollManager extends MiniClientPlugin } player.sendMessage(""); player.sendMessage("Click an answer to receive " + C.cGreen + poll.getCoinReward() + " Gems"); - player.sendMessage(C.cGold + C.Bold + "--------------------------"); + player.sendMessage(C.cGold + C.Bold + "--------------------------------"); player.playSound(player.getEyeLocation(), Sound.ORB_PICKUP, 2f, 0f); } diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/command/PollCommand.java b/Plugins/Mineplex.Hub/src/mineplex/hub/poll/command/PollCommand.java index 123c3af16..9d25b9c0f 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/command/PollCommand.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/poll/command/PollCommand.java @@ -102,7 +102,7 @@ public class PollCommand extends CommandBase UtilPlayer.message(caller, "Reward: " + C.cYellow + poll.getCoinReward()); UtilPlayer.message(caller, ""); - DecimalFormat decimalFormat = new DecimalFormat("#.##"); + DecimalFormat decimalFormat = new DecimalFormat("#.#"); double aPercent = stats.getAPercent(); double bPercent = stats.getBPercent(); double cPercent = stats.getCPercent(); @@ -123,7 +123,7 @@ public class PollCommand extends CommandBase percent = dPercent; UtilPlayer.message(caller, answer); - UtilPlayer.message(caller, getProgressBar(percent, 60) + " " + C.cWhite + "(" + C.cYellow + decimalFormat.format(percent) + "%" + C.cWhite + ")"); + UtilPlayer.message(caller, getProgressBar(percent, 60) + " " + C.cWhite + "(" + C.cYellow + decimalFormat.format(100d*percent) + "%" + C.cWhite + ")"); } } UtilPlayer.message(caller, " "); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameAchievementManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameAchievementManager.java index 19b7dd2a1..3ed17593e 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameAchievementManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameAchievementManager.java @@ -82,7 +82,7 @@ public class GameAchievementManager implements Listener //Display for (final Achievement type : log.keySet()) { - UtilPlayer.message(player, ""); + AchievementData data = Manager.GetAchievement().get(player, type); @@ -100,6 +100,7 @@ public class GameAchievementManager implements Listener //Finishing for the first time if (!Manager.GetTaskManager().hasCompletedTask(player, type.getName())) { + UtilPlayer.message(player, ""); UtilPlayer.message(player, nameLevel + " " + F.elem(C.cAqua + C.Bold + "Completed!") + " " + F.elem(C.cGreen + C.Bold + "+" + type.getGemReward() + " Gems")); @@ -122,6 +123,7 @@ public class GameAchievementManager implements Listener //Multi-Level Achievements else if (log.get(type).LevelUp) { + UtilPlayer.message(player, ""); UtilPlayer.message(player, nameLevel + " " + progress + " " + F.elem(C.cAqua + C.Bold + "LEVEL UP!")); @@ -132,6 +134,7 @@ public class GameAchievementManager implements Listener //Single Level if (type.getMaxLevel() == 1) { + UtilPlayer.message(player, ""); UtilPlayer.message(player, nameLevel + " " + progress + " " + F.elem(ChatColor.YELLOW + "" + (data.getExpNextLevel() - data.getExpRemainder()) + " to Complete")); } @@ -140,12 +143,14 @@ public class GameAchievementManager implements Listener //Multi Level - Almost Finished if (data.getLevel() == type.getMaxLevel() - 1) { + UtilPlayer.message(player, ""); UtilPlayer.message(player, nameLevel + " " + progress + " " + F.elem(ChatColor.YELLOW + "" + (data.getExpNextLevel() - data.getExpRemainder()) + " to Complete")); } //Multi Level - Many levels to go else { + UtilPlayer.message(player, ""); UtilPlayer.message(player, nameLevel + " " + progress + " " + F.elem(ChatColor.YELLOW + "" + (data.getExpNextLevel() - data.getExpRemainder()) + " to Next Level")); } From bdef9acecddb3de6ba9edcc5bd5106ac2af9812b Mon Sep 17 00:00:00 2001 From: CoderTim Date: Thu, 28 Aug 2014 00:53:54 -0400 Subject: [PATCH 03/14] Fixed DragonEscape win stat tracker --- .../game/games/dragonescape/DragonEscape.java | 25 +++++++++++++++++++ .../game/arcade/stats/WinMapStatTracker.java | 18 +++---------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/dragonescape/DragonEscape.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/dragonescape/DragonEscape.java index 109eacde6..927a914aa 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/dragonescape/DragonEscape.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/dragonescape/DragonEscape.java @@ -18,7 +18,9 @@ import org.bukkit.entity.EnderDragon; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.HandlerList; import org.bukkit.event.block.Action; +import org.bukkit.event.player.PlayerEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.util.Vector; @@ -43,6 +45,27 @@ import nautilus.game.arcade.stats.WinMapStatTracker; public class DragonEscape extends SoloGame { + public static class PlayerFinishEvent extends PlayerEvent + { + private static final HandlerList HANDLER_LIST = new HandlerList(); + + public static HandlerList getHandlerList() + { + return HANDLER_LIST; + } + + public PlayerFinishEvent(Player who) + { + super(who); + } + + @Override + public HandlerList getHandlers() + { + return getHandlerList(); + } + } + private ArrayList _ranks = new ArrayList(); private ArrayList _lastScoreboard = new ArrayList(); @@ -254,6 +277,8 @@ public class DragonEscape extends SoloGame _winner = player; this.SetCustomWinLine(player.getName() + " reached the end of the course!"); + Bukkit.getPluginManager().callEvent(new PlayerFinishEvent(player)); + return true; } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinMapStatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinMapStatTracker.java index 61e097f72..29b999f9b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinMapStatTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/WinMapStatTracker.java @@ -1,13 +1,10 @@ package nautilus.game.arcade.stats; -import java.util.List; - -import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; -import nautilus.game.arcade.events.GameStateChangeEvent; import nautilus.game.arcade.game.Game; +import nautilus.game.arcade.game.games.dragonescape.DragonEscape; public class WinMapStatTracker extends StatTracker { @@ -17,17 +14,8 @@ public class WinMapStatTracker extends StatTracker } @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) - public void onGameStateChange(GameStateChangeEvent event) + public void onDragonEscapePlayerFinish(DragonEscape.PlayerFinishEvent event) { - if (event.GetState() == Game.GameState.End) - { - List winners = getGame().getWinners(); - - if (winners != null) - { - for (Player winner : winners) - addStat(winner, "Win." + getGame().WorldData.MapName, 1, true, false); - } - } + addStat(event.getPlayer(), "Win." + getGame().WorldData.MapName, 1, true, false); } } From 409e2c6141552b0d427960350f04a52218f38018 Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Thu, 28 Aug 2014 14:01:37 -0700 Subject: [PATCH 04/14] Tweaked menus for quick game, Cosmetic menu. Removed debug for Hub Output a little debug info in LobbyBalancer Added duplicate check to ServerMonitor updated Customer SUpport server to have changeable password, added logging of command executors, added lifetime perks for hero/ultra --- .../bungee/lobbyBalancer/LobbyBalancer.java | 3 + .../mineplex/core/cosmetic/ui/page/Menu.java | 4 +- .../Mineplex.Hub/src/mineplex/hub/Hub.java | 2 - .../hub/server/ui/ServerGameMenu.java | 7 +- .../mineplex/hub/server/ui/ServerNpcPage.java | 2 +- .../src/mineplex/serverdata/ServerGroup.java | 20 +- .../mineplex/servermonitor/ServerMonitor.java | 28 +- .../customerSupport/CustomerSupport.java | 20 +- .../password/ChangePasswordCommand.java | 23 + .../staffServer/password/Password.java | 14 +- .../staffServer/password/PasswordCommand.java | 1 + .../salespackage/command/CoinCommand.java | 2 +- .../command/LifetimeHeroCommand.java | 33 ++ .../command/LifetimeUltraCommand.java | 33 ++ .../salespackage/command/Sales.java | 2 + .../salespackages/LifetimeHero.java | 5 +- .../salespackages/LifetimeUltra.java | 5 +- .../Models/AccountAdministrator.cs | 90 ++++ .../LOC.Website.Web.Publish.xml | 448 +++++++++--------- 19 files changed, 477 insertions(+), 265 deletions(-) create mode 100644 Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/ChangePasswordCommand.java create mode 100644 Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeHeroCommand.java create mode 100644 Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeUltraCommand.java diff --git a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/lobbyBalancer/LobbyBalancer.java b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/lobbyBalancer/LobbyBalancer.java index 976e2052f..b0468daf8 100644 --- a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/lobbyBalancer/LobbyBalancer.java +++ b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/lobbyBalancer/LobbyBalancer.java @@ -80,7 +80,10 @@ public class LobbyBalancer implements Listener, Runnable } if (_bestServerIndex < _sortedLobbies.size()) + { event.setTarget(_plugin.getProxy().getServerInfo(_sortedLobbies.get(_bestServerIndex).getName())); + System.out.println("Sending " + event.getPlayer().getName() + " to " + _sortedLobbies.get(_bestServerIndex).getName() + "(" + _sortedLobbies.get(_bestServerIndex).getPublicAddress() + ")"); + } _playersSentToBestServer++; } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java index 301278497..0771f34f4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java @@ -1,12 +1,14 @@ package mineplex.core.cosmetic.ui.page; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.Player; import mineplex.core.account.CoreClientManager; import mineplex.core.common.CurrencyType; import mineplex.core.common.util.C; +import mineplex.core.common.util.F; import mineplex.core.cosmetic.CosmeticManager; import mineplex.core.cosmetic.event.ActivateGemBoosterEvent; import mineplex.core.cosmetic.ui.CosmeticShop; @@ -49,7 +51,7 @@ public class Menu extends ShopPageBase else { */ - AddItem(13, new ShopItem(Material.CHEST, C.cGold + treasureChestCount + " Treasure Chests (COMING SOON!)", 1, false)); + AddItem(13, new ShopItem(Material.CHEST, C.cGold + treasureChestCount + " Treasure Chests (COMING SOON!)" + ChatColor.RESET, 1, false)); //} final GemBooster gemBoosterItem = new GemBooster(Shop.getBoosterEnabled(), Plugin.getInventoryManager().Get(Player).getItemCount("Gem Booster")); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java index 7251dc428..34dc35492 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java @@ -132,8 +132,6 @@ public class Hub extends JavaPlugin implements IRelation //Updates getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1); - - MinecraftServer.getServer().getPropertyManager().setProperty("debug", true); } @Override diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java index 4e4680c77..25068829a 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java @@ -54,7 +54,7 @@ public class ServerGameMenu extends ShopPageBase ChatColor.RESET + "death with the other teams.", })); - this.setItem(3, ItemStackFactory.Instance.CreateStack(Material.IRON_SWORD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Survival Games " + C.cGray + "Last Man Standing", new String[] + this.setItem(3, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_SWORD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Survival Games " + C.cGray + "Last Man Standing", new String[] { ChatColor.RESET + "", ChatColor.RESET + "Search for chests to find loot and ", @@ -150,10 +150,9 @@ public class ServerGameMenu extends ShopPageBase ChatColor.RESET + "Dragon Escape", ChatColor.RESET + "Milk the Cow", ChatColor.RESET + "Super Paintball", - ChatColor.RESET + "Turf Forts", + ChatColor.RESET + "Turf Wars", ChatColor.RESET + "Death Tag", - ChatColor.RESET + "Bacon Brawl", - ChatColor.RESET + "Squid Sauce" + ChatColor.RESET + "Bacon Brawl" })); _minigameCycle.add(ItemStackFactory.Instance.CreateStack(122, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String [] diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java index 832e84af7..d9f6a9fa7 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java @@ -305,7 +305,7 @@ public class ServerNpcPage extends ShopPageBase im { int slots = Plugin.GetRequiredSlots(player, serverInfo.ServerType); - if ((serverInfo.Name.contains("BETA") && !Client.GetRank().Has(Rank.ULTRA)) || (serverInfo.MaxPlayers - serverInfo.CurrentPlayers < slots && !(DonationManager.Get(Player.getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA") || Client.GetRank().Has(Rank.ULTRA)))) + if (serverInfo.MaxPlayers - serverInfo.CurrentPlayers < slots && !(DonationManager.Get(Player.getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA") || Client.GetRank().Has(Rank.ULTRA))) { PlayDenySound(player); return; diff --git a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/ServerGroup.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/ServerGroup.java index 00976ecda..a07e52ba4 100644 --- a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/ServerGroup.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/ServerGroup.java @@ -84,7 +84,8 @@ public class ServerGroup public boolean getAddNoCheat() { return _addNoCheat; } // The set of active MinecraftServers that belong to this server group - private Set servers; + private Set _servers; + public Set getServers() { return _servers; } /** * Class constructor @@ -124,7 +125,7 @@ public class ServerGroup */ public int getServerCount() { - return servers.size(); + return _servers.size(); } /** @@ -135,7 +136,7 @@ public class ServerGroup { int joinable = 0; - for (MinecraftServer server : servers) + for (MinecraftServer server : _servers) { if (server.isJoinable()) { @@ -154,7 +155,7 @@ public class ServerGroup { int playerCount = 0; - for (MinecraftServer server : servers) + for (MinecraftServer server : _servers) { playerCount += server.getPlayerCount(); } @@ -170,7 +171,7 @@ public class ServerGroup { int maxPlayerCount = 0; - for (MinecraftServer server : servers) + for (MinecraftServer server : _servers) { maxPlayerCount += server.getMaxPlayerCount(); } @@ -186,7 +187,7 @@ public class ServerGroup { Collection emptyServers = new HashSet(); - for (MinecraftServer server : servers) + for (MinecraftServer server : _servers) { if (server.isEmpty()) { @@ -203,14 +204,14 @@ public class ServerGroup */ private void fetchServers(Region region) { - this.servers = new HashSet(); + this._servers = new HashSet(); ServerRepository repository = ServerManager.getServerRepository(region); for (MinecraftServer server : repository.getServerStatuses()) { if (_name.equalsIgnoreCase(server.getGroup())) { - servers.add(server); + _servers.add(server); } } } @@ -226,7 +227,7 @@ public class ServerGroup { boolean uniqueId = true; - for (MinecraftServer server : servers) + for (MinecraftServer server : _servers) { String serverName = server.getName(); try @@ -255,5 +256,4 @@ public class ServerGroup } } } - } diff --git a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java index 308538ef0..29bd07db9 100644 --- a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java +++ b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java @@ -18,6 +18,7 @@ import java.util.Map.Entry; import java.util.logging.FileHandler; import java.util.logging.Logger; +import mineplex.core.common.util.NautHashMap; import mineplex.serverdata.DedicatedServer; import mineplex.serverdata.DedicatedServerSorter; import mineplex.serverdata.MinecraftServer; @@ -105,21 +106,26 @@ public class ServerMonitor iterator.remove(); } - // TODO: Check with Jonathan to see if we still need this duplication server code - /*for (GroupStatusData groupStatus : groupStatusList.values()) + for (ServerGroup groupStatus : serverGroups) { - for (ServerStatusData serverToKill : groupStatus.KillServers) - { - System.out.println("----DUPLICATE SERVER----> " + serverToKill.Address + ", " + serverToKill.Name); - killServer(serverToKill); - } + NautHashMap _serverMap = new NautHashMap(); - for (ServerStatusData serverToKill : groupStatus.Servers.values()) + for (Iterator serverIterator = groupStatus.getServers().iterator(); serverIterator.hasNext();) { - if (serverTracker.containsKey(serverToKill.Name)) - serverTracker.remove(serverToKill.Name); + MinecraftServer server = serverIterator.next(); + int serverNum = Integer.parseInt(server.getName().split("-")[1]); + + if (_serverMap.containsKey(serverNum)) + { + killServer(server.getName(), server.getPublicAddress(), "[KILLED] [DUPLICATE] " + server.getName() + ":" + server.getPublicAddress(), true); + serverIterator.remove(); + } + else + { + _serverMap.put(serverNum, server); + } } - }*/ + } HashSet onlineServers = new HashSet(); diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java index b04ef8736..c4cea7af3 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java @@ -3,10 +3,11 @@ package mineplex.staffServer.customerSupport; import java.text.SimpleDateFormat; import java.util.HashSet; +import org.bukkit.GameMode; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.entity.EntityDamageEvent; -import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.entity.FoodLevelChangeEvent; import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.player.AsyncPlayerChatEvent; @@ -17,13 +18,9 @@ import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.MiniPlugin; import mineplex.core.account.CoreClient; import mineplex.core.account.CoreClientManager; -import mineplex.core.common.Rank; import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.NautHashMap; -import mineplex.core.common.util.UtilMath; -import mineplex.core.common.util.UtilPlayer; -import mineplex.core.common.util.UtilServer; import mineplex.core.donation.DonationManager; import mineplex.core.donation.Donor; import mineplex.core.donation.repository.token.CoinTransactionToken; @@ -99,8 +96,10 @@ public class CustomerSupport extends MiniPlugin for (CoinTransactionToken transaction : donor.getCoinTransactions()) { - if (transaction.Source.equalsIgnoreCase("purchase")) - caller.sendMessage(C.cYellow + _date.format(transaction.Date) + C.cGray + " - " + C.cYellow + transaction.Amount + " Coins"); + if (transaction.Source.equalsIgnoreCase("Poll") || transaction.Source.equalsIgnoreCase("Coin Party Bomb Pickup") || transaction.Source.contains("Reward")) + continue; + + caller.sendMessage(C.cYellow + _date.format(transaction.Date) + C.cGray + " - " + C.cYellow + transaction.Amount + " Coins - Applied via " + transaction.Source); } for (TransactionToken transaction : donor.getTransactions()) @@ -112,6 +111,13 @@ public class CustomerSupport extends MiniPlugin _salesPackageManager.displaySalesPackages(caller, playerName); caller.sendMessage(C.cDGreen + C.Strike + "============================================="); } + + @EventHandler + public void blockBreak(BlockBreakEvent event) + { + if (event.getPlayer().getGameMode() != GameMode.CREATIVE) + event.setCancelled(true); + } @EventHandler public void removeMapping(PlayerQuitEvent event) diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/ChangePasswordCommand.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/ChangePasswordCommand.java new file mode 100644 index 000000000..055b1ff0f --- /dev/null +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/ChangePasswordCommand.java @@ -0,0 +1,23 @@ +package mineplex.staffServer.password; + +import org.bukkit.entity.Player; + +import mineplex.core.command.CommandBase; +import mineplex.core.common.Rank; + +public class ChangePasswordCommand extends CommandBase +{ + public ChangePasswordCommand(Password plugin) + { + super(plugin, Rank.ADMIN, "changepassword"); + } + + @Override + public void Execute(Player caller, String[] args) + { + if (args != null && args.length == 1) + { + Plugin.changePassword(caller, args[0]); + } + } +} diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/Password.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/Password.java index 7cd6a7c09..8836fdb8f 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/Password.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/Password.java @@ -9,10 +9,13 @@ import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.MiniPlugin; import mineplex.core.common.util.F; +import mineplex.core.recharge.Recharge; public class Password extends MiniPlugin { private HashSet _accepted = new HashSet(); + + private String _password = "ClothStarRust"; public Password(JavaPlugin plugin) { @@ -23,6 +26,7 @@ public class Password extends MiniPlugin public void AddCommands() { AddCommand(new PasswordCommand(this)); + AddCommand(new ChangePasswordCommand(this)); } @EventHandler @@ -35,17 +39,23 @@ public class Password extends MiniPlugin public void run() { if (!_accepted.contains(event.getPlayer())) - event.getPlayer().kickPlayer("You don't know the password little twerp."); + event.getPlayer().kickPlayer("You don't know the password!"); } }, 200L); } public void checkPassword(Player caller, String attempt) { - if (attempt.equals("ClothStarRust")) + if (attempt.equals(_password)) { _accepted.add(caller); caller.sendMessage(F.main(GetName(), "I guess you get to stay.")); } } + + public void changePassword(Player caller, String password) + { + _password = password; + caller.sendMessage(F.main(GetName(), "Password changed to " + _password)); + } } diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/PasswordCommand.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/PasswordCommand.java index eedca6380..908e15d48 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/PasswordCommand.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/PasswordCommand.java @@ -17,6 +17,7 @@ public class PasswordCommand extends CommandBase { if (args != null && args.length == 1) { + resetCommandCharge(caller); Plugin.checkPassword(caller, args[0]); } } diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/CoinCommand.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/CoinCommand.java index b447b164b..977bfa9eb 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/CoinCommand.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/CoinCommand.java @@ -23,7 +23,7 @@ public class CoinCommand extends CommandBase String playerName = args[0]; int amount = Integer.parseInt(args[1]); - Plugin.getDonationManager().RewardCoins(null, "purchase", playerName, amount); + Plugin.getDonationManager().RewardCoins(null, caller.getName(), playerName, amount); caller.sendMessage(F.main(Plugin.GetName(), "Added " + amount + " coins to " + playerName + "'s account!")); } } diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeHeroCommand.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeHeroCommand.java new file mode 100644 index 000000000..9bf6a28ab --- /dev/null +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeHeroCommand.java @@ -0,0 +1,33 @@ +package mineplex.staffServer.salespackage.command; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; + +import mineplex.core.command.CommandBase; +import mineplex.core.common.Rank; +import mineplex.staffServer.salespackage.SalesPackageManager; + +public class LifetimeHeroCommand extends CommandBase +{ + public LifetimeHeroCommand(SalesPackageManager plugin) + { + super(plugin, Rank.MODERATOR, "lifetimehero"); + } + + @Override + public void Execute(Player caller, String[] args) + { + resetCommandCharge(caller); + PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " HERO true"); + Bukkit.getServer().getPluginManager().callEvent(event); + + resetCommandCharge(caller); + event = new PlayerCommandPreprocessEvent(caller, "/sales coin " + args[0] + " 40000"); + Bukkit.getServer().getPluginManager().callEvent(event); + + resetCommandCharge(caller); + event = new PlayerCommandPreprocessEvent(caller, "/sales booster " + args[0] + " 120"); + Bukkit.getServer().getPluginManager().callEvent(event); + } +} diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeUltraCommand.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeUltraCommand.java new file mode 100644 index 000000000..970221cfe --- /dev/null +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeUltraCommand.java @@ -0,0 +1,33 @@ +package mineplex.staffServer.salespackage.command; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; + +import mineplex.core.command.CommandBase; +import mineplex.core.common.Rank; +import mineplex.staffServer.salespackage.SalesPackageManager; + +public class LifetimeUltraCommand extends CommandBase +{ + public LifetimeUltraCommand(SalesPackageManager plugin) + { + super(plugin, Rank.MODERATOR, "lifetimeultra"); + } + + @Override + public void Execute(Player caller, String[] args) + { + resetCommandCharge(caller); + PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " ULTRA true"); + Bukkit.getServer().getPluginManager().callEvent(event); + + resetCommandCharge(caller); + event = new PlayerCommandPreprocessEvent(caller, "/sales coin " + args[0] + " 20000"); + Bukkit.getServer().getPluginManager().callEvent(event); + + resetCommandCharge(caller); + event = new PlayerCommandPreprocessEvent(caller, "/sales booster " + args[0] + " 60"); + Bukkit.getServer().getPluginManager().callEvent(event); + } +} diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/Sales.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/Sales.java index 7103aecbb..b5edb5362 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/Sales.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/Sales.java @@ -17,6 +17,8 @@ public class Sales extends MultiCommandBase AddCommand(new BoosterCommand(plugin)); AddCommand(new UltraCommand(plugin)); AddCommand(new HeroCommand(plugin)); + AddCommand(new LifetimeUltraCommand(plugin)); + AddCommand(new LifetimeHeroCommand(plugin)); } @Override diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeHero.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeHero.java index 610eb524b..11be30d2d 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeHero.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeHero.java @@ -13,7 +13,10 @@ public class LifetimeHero extends SalesPackageBase public void displayToAgent(Player agent, String playerName) { - addButton(agent, "/sales rank " + playerName + " HERO true", " Lifetime Hero Rank."); + addButton(agent, "/sales coin " + playerName + " 40000", " 40,000 Coins"); + addButton(agent, "/sales booster " + playerName + " 120", " 120 Gem Boosters"); + addButton(agent, "/sales rank " + playerName + " HERO true", " Lifetime Hero (Also, unlocks kits)."); + addButton(agent, "Apply All", "/sales lifetimehero " + playerName, " Apply all above."); agent.sendMessage(" "); addBackButton(agent, playerName); } diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeUltra.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeUltra.java index b00b44ca9..991c1551e 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeUltra.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeUltra.java @@ -13,7 +13,10 @@ public class LifetimeUltra extends SalesPackageBase public void displayToAgent(Player agent, String playerName) { - addButton(agent, "/sales rank " + playerName + " ULTRA true", " Lifetime Ultra Rank."); + addButton(agent, "/sales coin " + playerName + " 20000", " 20,000 Coins"); + addButton(agent, "/sales booster " + playerName + " 60", " 60 Gem Boosters"); + addButton(agent, "/sales rank " + playerName + " ULTRA true", " Lifetime Ultra (Also, unlocks kits)."); + addButton(agent, "Apply All", "/sales lifetimeultra " + playerName, " Apply all above."); agent.sendMessage(" "); addBackButton(agent, playerName); } diff --git a/Website/LOC.Website.Common/Models/AccountAdministrator.cs b/Website/LOC.Website.Common/Models/AccountAdministrator.cs index 34bf7c40f..851a817f0 100644 --- a/Website/LOC.Website.Common/Models/AccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/AccountAdministrator.cs @@ -556,6 +556,77 @@ account.RankExpire = DateTime.Now.AddMonths(1); account.RankPerm = token.Perm; + if ((rank.Name == "HERO" || rank.Name == "ULTRA") && token.Perm == true) + { + repository.Attach(account); + repository.Edit(account); + + addAccountTransaction(repository, account, "Bacon Brawl Bebe Piggles", 0, 0); + addAccountTransaction(repository, account, "Bacon Brawl `Pig`", 0, 0); + addAccountTransaction(repository, account, "A Barbarians Life Barbarian Archer", 0, 0); + addAccountTransaction(repository, account, "A Barbarians Life Bomber", 0, 0); + addAccountTransaction(repository, account, "The Bridges Archer", 0, 0); + addAccountTransaction(repository, account, "The Bridges Bomber", 0, 0); + addAccountTransaction(repository, account, "The Bridges Brawler", 0, 0); + addAccountTransaction(repository, account, "The Bridges Miner", 0, 0); + addAccountTransaction(repository, account, "Castle Siege Castle Assassin", 0, 0); + addAccountTransaction(repository, account, "Castle Siege Castle Brawler", 0, 0); + addAccountTransaction(repository, account, "Castle Siege Castle Knight", 0, 0); + addAccountTransaction(repository, account, "Castle Siege Undead Archer", 0, 0); + addAccountTransaction(repository, account, "Castle Siege Undead Zombie", 0, 0); + addAccountTransaction(repository, account, "Death Tag Runner Archer", 0, 0); + addAccountTransaction(repository, account, "Death Tag Runner Traitor", 0, 0); + addAccountTransaction(repository, account, "Dragon Escape Disruptor", 0, 0); + addAccountTransaction(repository, account, "Dragon Escape Warper", 0, 0); + addAccountTransaction(repository, account, "Dragons Marksman", 0, 0); + addAccountTransaction(repository, account, "Dragons Pyrotechnic", 0, 0); + addAccountTransaction(repository, account, "Block Hunt Instant Hider", 0, 0); + addAccountTransaction(repository, account, "Block Hunt Shocking Hider", 0, 0); + addAccountTransaction(repository, account, "Block Hunt Radar Hunter", 0, 0); + addAccountTransaction(repository, account, "Block Hunt TNT Hunter", 0, 0); + addAccountTransaction(repository, account, "Super Paintball Machine Gun", 0, 0); + addAccountTransaction(repository, account, "Super Paintball Shotgun", 0, 0); + addAccountTransaction(repository, account, "One in the Quiver Brawler", 0, 0); + addAccountTransaction(repository, account, "One in the Quiver Enchanter", 0, 0); + addAccountTransaction(repository, account, "Runner Archer", 0, 0); + addAccountTransaction(repository, account, "Runner Frosty", 0, 0); + addAccountTransaction(repository, account, "Sheep Quest Archer", 0, 0); + addAccountTransaction(repository, account, "Sheep Quest Brute", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Blaze", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Chicken", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Mad Cow", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Creeper", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Enderman", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Undead Knight", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Magma Cube", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Pig", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Skeletal Horse", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Sky Squid", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Snowman", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Witch", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Wither", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Wither Skeleton", 0, 0); + addAccountTransaction(repository, account, "Super Smash Mobs Wolf", 0, 0); + addAccountTransaction(repository, account, "Snake Super Snake", 0, 0); + addAccountTransaction(repository, account, "Snake Other Snake", 0, 0); + addAccountTransaction(repository, account, "Sneaky Assassins Ranged Assassin", 0, 0); + addAccountTransaction(repository, account, "Sneaky Assassins Revealer", 0, 0); + addAccountTransaction(repository, account, "Super Spleef Archer", 0, 0); + addAccountTransaction(repository, account, "Super Spleef Brawler", 0, 0); + addAccountTransaction(repository, account, "Squid Shooter Squid Blaster", 0, 0); + addAccountTransaction(repository, account, "Squid Shooter Squid Sniper", 0, 0); + addAccountTransaction(repository, account, "Survival Games Archer", 0, 0); + addAccountTransaction(repository, account, "Survival Games Assassin", 0, 0); + addAccountTransaction(repository, account, "Survival Games Beastmaster", 0, 0); + addAccountTransaction(repository, account, "Survival Games Bomber", 0, 0); + addAccountTransaction(repository, account, "Survival Games Brawler", 0, 0); + addAccountTransaction(repository, account, "Survival Games Necromancer", 0, 0); + addAccountTransaction(repository, account, "Turf Wars Infiltrator", 0, 0); + addAccountTransaction(repository, account, "Turf Wars Shredder", 0, 0); + addAccountTransaction(repository, account, "Zombie Survival Survivor Archer", 0, 0); + addAccountTransaction(repository, account, "Zombie Survival Survivor Rogue", 0, 0); + } + repository.CommitChanges(); return rank.Name.ToString(); @@ -710,5 +781,24 @@ return clientToken; } } + + private void addAccountTransaction(IRepository repository, Account account, string salesPackageName, int gems, int coins) + { + var accountTransaction = new AccountTransaction + { + Account = account, + SalesPackageName = salesPackageName, + Date = (long)TimeUtil.GetCurrentMilliseconds(), + Gems = gems, + Coins = coins + }; + + if (account.AccountTransactions == null) + account.AccountTransactions = new List { accountTransaction }; + else + { + account.AccountTransactions.Add(accountTransaction); + } + } } } \ No newline at end of file diff --git a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml index bd2a0d731..8209eb247 100644 --- a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml +++ b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml @@ -1,12 +1,12 @@  + - @@ -17,16 +17,20 @@ - + + + - + + + @@ -40,25 +44,27 @@ + + + + - - - - + + @@ -69,33 +75,31 @@ - + + - - + - - - - + + - + @@ -103,42 +107,41 @@ + - + - - - + + - - + + - + + - - + - - + @@ -149,52 +152,47 @@ - + - - - - + - - - + + - - + - + - - + + @@ -202,73 +200,77 @@ - + - - + + - + - + - - - + + - + - + - + + - + - + + + - - + + - + - - + + - - + + - + + + @@ -281,15 +283,14 @@ - - + + - @@ -303,26 +304,26 @@ - - + - + + - + @@ -333,21 +334,21 @@ - - + - + + @@ -355,6 +356,8 @@ + + @@ -362,44 +365,41 @@ - + - + - - + - + - - - - - + + - + + @@ -414,27 +414,30 @@ - + + + + + + - - - + + - @@ -442,96 +445,95 @@ - + - - + - + - + - + - + - + - - + + - - + - - + - - + + - - + + - + - - - - - + + + + + - + + + @@ -542,24 +544,24 @@ - + - - + - + - + + @@ -569,24 +571,23 @@ - + - - + - + @@ -597,21 +598,20 @@ - - + + - - + @@ -619,19 +619,21 @@ + - - + + - - + + + @@ -645,28 +647,29 @@ + - + - + + - - + + - @@ -675,59 +678,58 @@ - + + + + + + - - - - - + + + - - - + - + - - + - - - + + - + - + @@ -735,66 +737,66 @@ - + - + - - - - + + + - + - + - - + - - + + - - + + - + - - - - - + + + + + - + + + @@ -805,24 +807,24 @@ - + - - + - + - + + @@ -832,14 +834,13 @@ - + - @@ -849,7 +850,7 @@ - + @@ -860,21 +861,20 @@ - - + + - - + @@ -882,6 +882,7 @@ + @@ -890,11 +891,12 @@ - - + + + @@ -908,28 +910,29 @@ + - + - + + - - + + - @@ -938,59 +941,58 @@ - + + + + + + - - - + - - - + - + - - + - - - + + - + - + @@ -998,58 +1000,56 @@ - + - + - - + + - - + - - + - - + + - - + + - + - - - - - + + + + + - + \ No newline at end of file From fa56aa084343b71409fc9aae607d32b5dc60e242 Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Thu, 28 Aug 2014 14:02:55 -0700 Subject: [PATCH 05/14] Fixed regular players not able to join Beta servers. --- .../src/mineplex/hub/server/ServerManager.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java index 4203e8771..12cb4aa5d 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java @@ -492,12 +492,6 @@ public class ServerManager extends MiniPlugin if (partyPlayer == null) continue; - if (serverInfo.Name.contains("BETA")) - { - if (!_clientManager.Get(partyPlayer).GetRank().Has(Rank.ULTRA)) - continue; - } - if (!_clientManager.Get(partyPlayer).GetRank().Has(Rank.MODERATOR) && serverInfo.CurrentPlayers >= serverInfo.MaxPlayers * 1.5) continue; @@ -517,12 +511,6 @@ public class ServerManager extends MiniPlugin if (partyPlayer == null) continue; - if (serverInfo.Name.contains("BETA")) - { - if (!_clientManager.Get(partyPlayer).GetRank().Has(Rank.ULTRA)) - continue; - } - if (!_clientManager.Get(partyPlayer).GetRank().Has(Rank.MODERATOR) && serverInfo.CurrentPlayers >= serverInfo.MaxPlayers * 1.5) continue; From c3bb0ddbcb3380e82d18d9cde4cc738194b1a42d Mon Sep 17 00:00:00 2001 From: Chiss Date: Fri, 29 Aug 2014 11:00:16 +1000 Subject: [PATCH 06/14] Chest example gadget for shauny --- .../mineplex/core/common/util/UtilAlg.java | 3 + .../core/command/MultiCommandBase.java | 2 +- .../mineplex/core/gadget/GadgetManager.java | 1 + .../core/gadget/gadgets/ItemChestExample.java | 113 ++++++++++++++++++ .../src/nautilus/game/arcade/GameFactory.java | 4 +- 5 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemChestExample.java diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilAlg.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilAlg.java index 53eb34d07..638ad7db6 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilAlg.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilAlg.java @@ -115,6 +115,9 @@ public class UtilAlg public static T Random(List list) { + if (list.isEmpty()) + return null; + return list.get(UtilMath.r(list.size())); } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/command/MultiCommandBase.java b/Plugins/Mineplex.Core/src/mineplex/core/command/MultiCommandBase.java index e035964f6..9b07b368e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/command/MultiCommandBase.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/command/MultiCommandBase.java @@ -46,7 +46,7 @@ public abstract class MultiCommandBase extends Co { newArgs = new String[args.length - 1]; - for (int i = 0 ; i < newArgs.length; i++) + for (int i = 0 ; i < newArgs.length; i++) { newArgs[i] = args[i+1]; } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java index 32bac07fd..42050591d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java @@ -92,6 +92,7 @@ public class GadgetManager extends MiniPlugin addGadget(new ItemCoinBomb(this)); //addGadget(new ItemFootball(this)); //addGadget(new ItemDuelingSword(this)); + addGadget(new ItemChestExample(this)); // Costume addGadget(new OutfitRaveSuit(this, "Rave Helmet", 10000, ArmorSlot.Helmet, Material.LEATHER_HELMET, (byte)0)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemChestExample.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemChestExample.java new file mode 100644 index 000000000..2ae4fd384 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemChestExample.java @@ -0,0 +1,113 @@ +package mineplex.core.gadget.gadgets; + +import java.util.HashMap; +import java.util.Iterator; + +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.block.Block; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.ItemGadget; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; + +public class ItemChestExample extends ItemGadget +{ + private HashMap _active = new HashMap(); + + private int _duration = 2500; + + public ItemChestExample(GadgetManager manager) + { + super(manager, "Treasure Chest Example", new String[] + { + + }, + -1, + Material.FIREWORK, (byte)0, + 10, new Ammo("Treasure Chest Example", "10 Examples", Material.FIREWORK, (byte)0, new String[] { C.cWhite + "10 Examples!" }, 0, 10)); + } + + @Override + public void ActivateCustom(Player player) + { + _active.put(player.getLocation().add(2, 0, 0).getBlock(), System.currentTimeMillis()); + _active.put(player.getLocation().add(0, 0, 2).getBlock(), System.currentTimeMillis() + 2000); + _active.put(player.getLocation().add(-2, 0, 0).getBlock(), System.currentTimeMillis() + 4000); + _active.put(player.getLocation().add(0, 0, -2).getBlock(), System.currentTimeMillis() + 6000); + + for (int x=-2 ; x<=2 ; x++) + for (int z=-2 ; z<=2 ; z++) + { + Manager.getBlockRestore().Add(player.getLocation().getBlock().getRelative(x, -1, z), 159, (Math.abs(x) == 2 || Math.abs(z) == 2) ? (byte)14 : (byte)0, 20000); + + if ((Math.abs(x) == 2 || Math.abs(z) == 2) && x != 0 && z != 0) + { + Manager.getBlockRestore().Add(player.getLocation().getBlock().getRelative(x, 0, z), 160, (byte)0, 20000); + } + } + + } + + @EventHandler + public void update(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + Iterator activeIterator = _active.keySet().iterator(); + + while (activeIterator.hasNext()) + { + Block block = activeIterator.next(); + + long time = _active.get(block); + + //Hasnt Started + if (System.currentTimeMillis() < time) + continue; + + Location loc = block.getLocation().add(0.5, 0, 0.5); + + //Finished + if (UtilTime.elapsed(time, _duration)) + { + activeIterator.remove(); + + Manager.getBlockRestore().Add(block, 54, (byte)0, 20000); + + loc.getWorld().playSound(loc, Sound.HORSE_ARMOR, 1f, 1f); + + UtilParticle.PlayParticle(ParticleType.LAVA, loc.add(0, 0.5, 0), 0.2f, 0.2f, 0.2f, 0, 50); + + continue; + } + + //Just hacking in this so i can use my other code + int timeKey = (int) (System.currentTimeMillis() - time); + + float scale = (float)((double)(_duration - timeKey)/(double)_duration); + + float y = 5 * scale; + double width = 1.4 * ((double)timeKey / (double)_duration); + + for (int i=0 ; i < 2 ; i++) + { + double lead = i * ((2d * Math.PI)/2); + + float x = (float) (Math.sin(timeKey/200d + lead)); + float z = (float) (Math.cos(timeKey/200d + lead)); + + UtilParticle.PlayParticle(ParticleType.FLAME, loc.clone().add(x * width, y, z * width), 0f, 0f, 0f, 0, 1); + } + } + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameFactory.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameFactory.java index 4181d7e65..6108fa4b3 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameFactory.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameFactory.java @@ -26,7 +26,7 @@ import nautilus.game.arcade.game.games.halloween.Halloween; import nautilus.game.arcade.game.games.hideseek.HideSeek; import nautilus.game.arcade.game.games.micro.Micro; import nautilus.game.arcade.game.games.milkcow.MilkCow; -//import nautilus.game.arcade.game.games.minestrike.MineStrike; +import nautilus.game.arcade.game.games.minestrike.MineStrike; import nautilus.game.arcade.game.games.mineware.MineWare; import nautilus.game.arcade.game.games.quiver.Quiver; import nautilus.game.arcade.game.games.quiver.QuiverTeams; @@ -79,7 +79,7 @@ public class GameFactory else if (gameType == GameType.Halloween) return new Halloween(_manager); else if (gameType == GameType.HideSeek) return new HideSeek(_manager); else if (gameType == GameType.Micro) return new Micro(_manager); - //else if (gameType == GameType.MineStrike) return new MineStrike(_manager); + else if (gameType == GameType.MineStrike) return new MineStrike(_manager); else if (gameType == GameType.MineWare) return new MineWare(_manager); else if (gameType == GameType.MilkCow) return new MilkCow(_manager); else if (gameType == GameType.Paintball) return new Paintball(_manager); From 1f6b9374ebb179e5465d888c993066ce4e286846 Mon Sep 17 00:00:00 2001 From: Chiss Date: Fri, 29 Aug 2014 11:55:06 +1000 Subject: [PATCH 07/14] disable le minestrike --- .../mineplex/core/gadget/GadgetManager.java | 1 - .../core/gadget/gadgets/ItemChestExample.java | 113 ------------------ .../src/nautilus/game/arcade/GameFactory.java | 4 +- 3 files changed, 2 insertions(+), 116 deletions(-) delete mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemChestExample.java diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java index 42050591d..32bac07fd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java @@ -92,7 +92,6 @@ public class GadgetManager extends MiniPlugin addGadget(new ItemCoinBomb(this)); //addGadget(new ItemFootball(this)); //addGadget(new ItemDuelingSword(this)); - addGadget(new ItemChestExample(this)); // Costume addGadget(new OutfitRaveSuit(this, "Rave Helmet", 10000, ArmorSlot.Helmet, Material.LEATHER_HELMET, (byte)0)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemChestExample.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemChestExample.java deleted file mode 100644 index 2ae4fd384..000000000 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemChestExample.java +++ /dev/null @@ -1,113 +0,0 @@ -package mineplex.core.gadget.gadgets; - -import java.util.HashMap; -import java.util.Iterator; - -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.Sound; -import org.bukkit.block.Block; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; - -import mineplex.core.common.util.C; -import mineplex.core.common.util.UtilParticle; -import mineplex.core.common.util.UtilTime; -import mineplex.core.common.util.UtilParticle.ParticleType; -import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.types.ItemGadget; -import mineplex.core.updater.UpdateType; -import mineplex.core.updater.event.UpdateEvent; - -public class ItemChestExample extends ItemGadget -{ - private HashMap _active = new HashMap(); - - private int _duration = 2500; - - public ItemChestExample(GadgetManager manager) - { - super(manager, "Treasure Chest Example", new String[] - { - - }, - -1, - Material.FIREWORK, (byte)0, - 10, new Ammo("Treasure Chest Example", "10 Examples", Material.FIREWORK, (byte)0, new String[] { C.cWhite + "10 Examples!" }, 0, 10)); - } - - @Override - public void ActivateCustom(Player player) - { - _active.put(player.getLocation().add(2, 0, 0).getBlock(), System.currentTimeMillis()); - _active.put(player.getLocation().add(0, 0, 2).getBlock(), System.currentTimeMillis() + 2000); - _active.put(player.getLocation().add(-2, 0, 0).getBlock(), System.currentTimeMillis() + 4000); - _active.put(player.getLocation().add(0, 0, -2).getBlock(), System.currentTimeMillis() + 6000); - - for (int x=-2 ; x<=2 ; x++) - for (int z=-2 ; z<=2 ; z++) - { - Manager.getBlockRestore().Add(player.getLocation().getBlock().getRelative(x, -1, z), 159, (Math.abs(x) == 2 || Math.abs(z) == 2) ? (byte)14 : (byte)0, 20000); - - if ((Math.abs(x) == 2 || Math.abs(z) == 2) && x != 0 && z != 0) - { - Manager.getBlockRestore().Add(player.getLocation().getBlock().getRelative(x, 0, z), 160, (byte)0, 20000); - } - } - - } - - @EventHandler - public void update(UpdateEvent event) - { - if (event.getType() != UpdateType.TICK) - return; - - Iterator activeIterator = _active.keySet().iterator(); - - while (activeIterator.hasNext()) - { - Block block = activeIterator.next(); - - long time = _active.get(block); - - //Hasnt Started - if (System.currentTimeMillis() < time) - continue; - - Location loc = block.getLocation().add(0.5, 0, 0.5); - - //Finished - if (UtilTime.elapsed(time, _duration)) - { - activeIterator.remove(); - - Manager.getBlockRestore().Add(block, 54, (byte)0, 20000); - - loc.getWorld().playSound(loc, Sound.HORSE_ARMOR, 1f, 1f); - - UtilParticle.PlayParticle(ParticleType.LAVA, loc.add(0, 0.5, 0), 0.2f, 0.2f, 0.2f, 0, 50); - - continue; - } - - //Just hacking in this so i can use my other code - int timeKey = (int) (System.currentTimeMillis() - time); - - float scale = (float)((double)(_duration - timeKey)/(double)_duration); - - float y = 5 * scale; - double width = 1.4 * ((double)timeKey / (double)_duration); - - for (int i=0 ; i < 2 ; i++) - { - double lead = i * ((2d * Math.PI)/2); - - float x = (float) (Math.sin(timeKey/200d + lead)); - float z = (float) (Math.cos(timeKey/200d + lead)); - - UtilParticle.PlayParticle(ParticleType.FLAME, loc.clone().add(x * width, y, z * width), 0f, 0f, 0f, 0, 1); - } - } - } -} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameFactory.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameFactory.java index 6108fa4b3..4181d7e65 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameFactory.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/GameFactory.java @@ -26,7 +26,7 @@ import nautilus.game.arcade.game.games.halloween.Halloween; import nautilus.game.arcade.game.games.hideseek.HideSeek; import nautilus.game.arcade.game.games.micro.Micro; import nautilus.game.arcade.game.games.milkcow.MilkCow; -import nautilus.game.arcade.game.games.minestrike.MineStrike; +//import nautilus.game.arcade.game.games.minestrike.MineStrike; import nautilus.game.arcade.game.games.mineware.MineWare; import nautilus.game.arcade.game.games.quiver.Quiver; import nautilus.game.arcade.game.games.quiver.QuiverTeams; @@ -79,7 +79,7 @@ public class GameFactory else if (gameType == GameType.Halloween) return new Halloween(_manager); else if (gameType == GameType.HideSeek) return new HideSeek(_manager); else if (gameType == GameType.Micro) return new Micro(_manager); - else if (gameType == GameType.MineStrike) return new MineStrike(_manager); + //else if (gameType == GameType.MineStrike) return new MineStrike(_manager); else if (gameType == GameType.MineWare) return new MineWare(_manager); else if (gameType == GameType.MilkCow) return new MilkCow(_manager); else if (gameType == GameType.Paintball) return new Paintball(_manager); From 41daba98c4ee376720036471a31cf64a5b9888fe Mon Sep 17 00:00:00 2001 From: Chiss Date: Fri, 29 Aug 2014 18:21:08 +1000 Subject: [PATCH 08/14] Background work for Minestrike Admins no longer have OP in hubs. They have /gm command to gamemode. --- .../mineplex/core/achievement/Achievement.java | 4 ++-- .../Mineplex.Hub/src/mineplex/hub/HubManager.java | 4 +++- .../src/nautilus/game/arcade/game/Game.java | 15 ++++++++++----- .../src/nautilus/game/arcade/game/GameTeam.java | 11 ++++++++--- .../src/nautilus/game/arcade/game/TeamGame.java | 2 +- .../game/arcade/game/games/deathtag/DeathTag.java | 2 +- .../game/arcade/game/games/draw/Draw.java | 4 ++-- .../game/arcade/game/games/hideseek/HideSeek.java | 2 +- .../game/arcade/game/games/milkcow/MilkCow.java | 2 +- .../game/games/zombiesurvival/ZombieSurvival.java | 2 +- .../game/arcade/managers/GameManager.java | 8 ++++---- 11 files changed, 34 insertions(+), 22 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java index 2b2aeda75..1f22634d8 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java @@ -142,13 +142,13 @@ public enum Achievement BLOCK_HUNT_HUNTER_OF_THE_YEAR("Hunter of the Year", 1200, new String[] {"Block Hunt.HunterOfTheYear"}, new String[] {"Kill 7 Hiders in a single game"}, - new int[] {100}, + new int[] {1}, AchievementCategory.BLOCK_HUNT), BLOCK_HUNT_BAD_HIDER("Bad Hider", 1000, new String[] {"Block Hunt.BadHider"}, new String[] {"Win as Hider without disguising"}, - new int[] {100}, + new int[] {1}, AchievementCategory.BLOCK_HUNT), //Draw My Thing diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java index ec1a5020b..7ce466096 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java @@ -73,6 +73,7 @@ import mineplex.core.task.TaskManager; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.hub.commands.ForcefieldRadius; +import mineplex.hub.commands.GameModeCommand; import mineplex.hub.commands.NewsCommand; import mineplex.hub.modules.ForcefieldManager; import mineplex.hub.modules.JumpManager; @@ -309,6 +310,7 @@ public class HubManager extends MiniClientPlugin public void AddCommands() { AddCommand(new NewsCommand(this)); + AddCommand(new GameModeCommand(this)); } @EventHandler(priority = EventPriority.HIGHEST) @@ -463,7 +465,7 @@ public class HubManager extends MiniClientPlugin @EventHandler(priority = EventPriority.LOW) public void AdminOP(PlayerJoinEvent event) { - if (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.ADMIN)) + if (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.OWNER)) event.getPlayer().setOp(true); else event.getPlayer().setOp(false); 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 f99837be1..443f2c0cd 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 @@ -371,7 +371,12 @@ public abstract class Game implements Listener System.out.println(GetName() + " state set to " + state.toString()); } - + + public void SetStateTime(long time) + { + _gameStateTime = time; + } + public long GetStateTime() { return _gameStateTime; @@ -446,7 +451,7 @@ public abstract class Game implements Listener //Use this to parse in extra location data from maps } - public void SetPlayerTeam(Player player, GameTeam team) + public void SetPlayerTeam(Player player, GameTeam team, boolean in) { //Clean Old Team GameTeam pastTeam = this.GetTeam(player); @@ -455,7 +460,7 @@ public abstract class Game implements Listener pastTeam.RemovePlayer(player); } - team.AddPlayer(player); + team.AddPlayer(player, in); //Ensure Valid Kit ValidateKit(player, team); @@ -1017,13 +1022,13 @@ public abstract class Game implements Listener return; if (_helpColor == ChatColor.YELLOW) - _helpColor = ChatColor.GREEN; + _helpColor = ChatColor.GOLD; else _helpColor = ChatColor.YELLOW; _helpTimer = System.currentTimeMillis(); - String msg = C.cWhite + C.Bold + "TIP " + ChatColor.RESET + _helpColor + _help[_helpIndex]; + String msg = C.cWhite + C.Bold + "TIP> " + ChatColor.RESET + _helpColor + _help[_helpIndex]; for (Player player : UtilServer.getPlayers()) { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameTeam.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameTeam.java index b4be28aa3..69ef05849 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameTeam.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameTeam.java @@ -134,9 +134,9 @@ public class GameTeam return _spawns.get(UtilMath.r(_spawns.size())); } - public void AddPlayer(Player player) + public void AddPlayer(Player player, boolean in) { - _players.put(player, PlayerState.IN); + _players.put(player, in ? PlayerState.IN : PlayerState.OUT); UtilPlayer.message(player, F.main("Team", _color + C.Bold + "You joined " + _name + " Team") + "."); @@ -226,7 +226,12 @@ public class GameTeam public void SpawnTeleport() { - for (Player player : GetPlayers(true)) + SpawnTeleport(true); + } + + public void SpawnTeleport(boolean aliveOnly) + { + for (Player player : GetPlayers(aliveOnly)) { SpawnTeleport(player); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/TeamGame.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/TeamGame.java index f6b7a19b5..29eb24571 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/TeamGame.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/TeamGame.java @@ -97,7 +97,7 @@ public abstract class TeamGame extends Game GameTeam team = RejoinTeam.remove(event.getPlayer().getName()); if (team != null && _rejoinTime.remove(event.getPlayer().getName()) != null) { - team.AddPlayer(event.getPlayer()); + team.AddPlayer(event.getPlayer(), true); Announce(team.GetColor() + C.Bold + event.getPlayer().getName() + " has reconnected!", false); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/deathtag/DeathTag.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/deathtag/DeathTag.java index 28ec0d01f..429a69ef9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/deathtag/DeathTag.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/deathtag/DeathTag.java @@ -239,7 +239,7 @@ public class DeathTag extends SoloGame if (GetTeam(player) != null) GetTeam(player).SetPlacement(player, PlayerState.OUT); - SetPlayerTeam(player, _chasers); + SetPlayerTeam(player, _chasers, true); //Kit Kit newKit = GetKits()[5]; //Normal diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java index f2afd6711..23955f66c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java @@ -206,7 +206,7 @@ public class Draw extends SoloGame for (Player player : _drawers.GetPlayers(false)) { _drawers.RemovePlayer(player); - _guessers.AddPlayer(player); + _guessers.AddPlayer(player, true); UtilInv.Clear(player); player.setAllowFlight(false); @@ -228,7 +228,7 @@ public class Draw extends SoloGame //Select New Drawer Player drawer = _roundPlayer.remove(0); _guessers.RemovePlayer(drawer); - _drawers.AddPlayer(drawer); + _drawers.AddPlayer(drawer, true); //Get Word String word = _words[UtilMath.r(_words.length)]; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/HideSeek.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/HideSeek.java index dac9493dc..49e5724de 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/HideSeek.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/HideSeek.java @@ -958,7 +958,7 @@ public class HideSeek extends TeamGame public void SetSeeker(Player player, boolean forced) { - SetPlayerTeam(player, _seekers); + SetPlayerTeam(player, _seekers, true); Manager.GetDisguise().undisguise(player); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/milkcow/MilkCow.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/milkcow/MilkCow.java index 579b47a02..de3ad6e56 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/milkcow/MilkCow.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/milkcow/MilkCow.java @@ -284,7 +284,7 @@ public class MilkCow extends SoloGame if (GetTeam(player) != null) GetTeam(player).SetPlacement(player, PlayerState.OUT); - SetPlayerTeam(player, _cows); + SetPlayerTeam(player, _cows, true); //Kit Kit newKit = GetKits()[2]; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/zombiesurvival/ZombieSurvival.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/zombiesurvival/ZombieSurvival.java index e87a257f5..0ded820e1 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/zombiesurvival/ZombieSurvival.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/zombiesurvival/ZombieSurvival.java @@ -148,7 +148,7 @@ public class ZombieSurvival extends SoloGame GetTeam(player).SetPlacement(player, PlayerState.OUT); //Change to Undead - SetPlayerTeam(player, _undead); + SetPlayerTeam(player, _undead, true); //Kit Kit newKit = this.GetKits()[4]; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java index 77035d669..fc61cdc1f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java @@ -389,7 +389,7 @@ public class GameManager implements Listener } else { - game.SetPlayerTeam(player, team); + game.SetPlayerTeam(player, team, true); } } } @@ -435,10 +435,10 @@ public class GameManager implements Listener //Player Swap queueIterator.remove(); - game.SetPlayerTeam(player, team); + game.SetPlayerTeam(player, team, true); //Other Swap - game.SetPlayerTeam(other, currentTeam); + game.SetPlayerTeam(other, currentTeam, true); break; } @@ -523,7 +523,7 @@ public class GameManager implements Listener if (team == null) return false; - game.SetPlayerTeam(player, team); + game.SetPlayerTeam(player, team, true); //Game Mode player.setGameMode(GameMode.SURVIVAL); From 34f04ad4e31065deee3dff77fe3b8c86ba82ee80 Mon Sep 17 00:00:00 2001 From: CoderTim Date: Fri, 29 Aug 2014 21:09:51 -0400 Subject: [PATCH 09/14] Fixed Champions Assassination and Longshot achievements --- .../src/nautilus/game/arcade/stats/BackstabKillStatTracker.java | 2 +- .../nautilus/game/arcade/stats/TheLongestShotStatTracker.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/BackstabKillStatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/BackstabKillStatTracker.java index 1192bf03e..23a587b48 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/BackstabKillStatTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/BackstabKillStatTracker.java @@ -50,7 +50,7 @@ public class BackstabKillStatTracker extends StatTracker if (player == null) return; - if (event.GetLog().GetLastDamager().GetReason() != null && event.GetLog().GetLastDamager().GetReason().equalsIgnoreCase("Backstab")) + if (event.GetLog().GetLastDamager().GetReason() != null && event.GetLog().GetLastDamager().GetReason().contains("Backstab")) { Set hasDamaged = _hasDamaged.get(player.getUniqueId()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/TheLongestShotStatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/TheLongestShotStatTracker.java index c5721ab8c..487eb3639 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/TheLongestShotStatTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/TheLongestShotStatTracker.java @@ -43,7 +43,7 @@ public class TheLongestShotStatTracker extends StatTracker if (player == null) return; - if (event.GetLog().GetLastDamager().GetReason() != null && event.GetLog().GetLastDamager().GetReason().equalsIgnoreCase("longshot")) + if (event.GetLog().GetLastDamager().GetReason() != null && event.GetLog().GetLastDamager().GetReason().contains("Longshot")) { if (player.getLastDamageCause() instanceof EntityDamageByEntityEvent) { From b7baa1b2f411173f9526a7ab08cfdb4d632e0478 Mon Sep 17 00:00:00 2001 From: CoderTim Date: Sat, 30 Aug 2014 02:28:48 -0400 Subject: [PATCH 10/14] Count disconnecting from the server as a loss --- .../nautilus/game/arcade/game/SoloGame.java | 2 +- .../game/arcade/stats/LoseStatTracker.java | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/SoloGame.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/SoloGame.java index b34578ce8..0729d6de9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/SoloGame.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/SoloGame.java @@ -131,7 +131,7 @@ public abstract class SoloGame extends Game { List places = _players.GetPlacements(true); - if (places.isEmpty()) + if (places.isEmpty() || !places.get(0).isOnline()) return Arrays.asList(); else return Arrays.asList(places.get(0)); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/LoseStatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/LoseStatTracker.java index 4098395aa..c112f622b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/LoseStatTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/LoseStatTracker.java @@ -1,16 +1,22 @@ package nautilus.game.arcade.stats; +import java.util.HashSet; import java.util.List; +import java.util.Set; +import java.util.UUID; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; +import org.bukkit.event.player.PlayerQuitEvent; import nautilus.game.arcade.events.GameStateChangeEvent; import nautilus.game.arcade.game.Game; public class LoseStatTracker extends StatTracker { + private final Set _losers = new HashSet<>(); + public LoseStatTracker(Game game) { super(game); @@ -27,6 +33,9 @@ public class LoseStatTracker extends StatTracker { for (Player loser : losers) { + if (_losers.contains(loser.getUniqueId())) + continue; + addStat(loser, "Losses", 1, false, false); if (getGame().GetKit(loser) != null) @@ -35,4 +44,18 @@ public class LoseStatTracker extends StatTracker } } } + + @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) + public void onPlayerQuit(PlayerQuitEvent event) + { + if (getGame().GetState() == Game.GameState.Live && getGame().IsAlive(event.getPlayer())) + { + addStat(event.getPlayer(), "Losses", 1, false, false); + + if (getGame().GetKit(event.getPlayer()) != null) + addStat(event.getPlayer(), getGame().GetKit(event.getPlayer()).GetName() + " Losses", 1, false, false); + + _losers.add(event.getPlayer().getUniqueId()); + } + } } From 2c30cc3ef4b69ff8ec09b1c35f5f11b13ec4f555 Mon Sep 17 00:00:00 2001 From: Chiss Date: Sat, 30 Aug 2014 16:33:56 +1000 Subject: [PATCH 11/14] Implemented new servers flags Removed OP from Admisn in HUB, gave them /gm command instead --- .../hub/commands/GameModeCommand.java | 25 +++++++ .../src/nautilus/game/arcade/Arcade.java | 67 +++++++++++++++++++ .../nautilus/game/arcade/ArcadeManager.java | 66 ++++++++++++++++++ .../src/nautilus/game/arcade/game/Game.java | 11 ++- .../game/arcade/game/GameServerConfig.java | 19 ++++++ .../managers/GameAchievementManager.java | 7 +- .../game/arcade/managers/GameGemManager.java | 14 ++-- .../arcade/managers/GameLobbyManager.java | 4 +- .../game/arcade/managers/GameManager.java | 12 +++- .../game/arcade/managers/IdleManager.java | 2 +- .../game/arcade/managers/MiscManager.java | 4 +- 11 files changed, 210 insertions(+), 21 deletions(-) create mode 100644 Plugins/Mineplex.Hub/src/mineplex/hub/commands/GameModeCommand.java diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/commands/GameModeCommand.java b/Plugins/Mineplex.Hub/src/mineplex/hub/commands/GameModeCommand.java new file mode 100644 index 000000000..28e921f4e --- /dev/null +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/commands/GameModeCommand.java @@ -0,0 +1,25 @@ +package mineplex.hub.commands; + +import org.bukkit.GameMode; +import org.bukkit.entity.Player; + +import mineplex.core.command.CommandBase; +import mineplex.core.common.Rank; +import mineplex.hub.HubManager; + +public class GameModeCommand extends CommandBase +{ + public GameModeCommand(HubManager plugin) + { + super(plugin, Rank.ADMIN, new String[] {"gm"}); + } + + @Override + public void Execute(Player caller, String[] args) + { + if (caller.getGameMode() == GameMode.SURVIVAL) + caller.setGameMode(GameMode.CREATIVE); + else + caller.setGameMode(GameMode.SURVIVAL); + } +} 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 8816eeec6..7765d4375 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java @@ -178,6 +178,54 @@ public class Arcade extends JavaPlugin { config.Tournament = Boolean.parseBoolean(tokens[1]); } + else if (tokens[0].equals("TEAM_REJOIN")) + { + config.TeamRejoin = Boolean.parseBoolean(tokens[1]); + } + else if (tokens[0].equals("TEAM_AUTO_JOIN")) + { + config.TeamAutoJoin = Boolean.parseBoolean(tokens[1]); + } + else if (tokens[0].equals("TEAM_FORCE_BALANCE")) + { + config.TeamForceBalance = Boolean.parseBoolean(tokens[1]); + } + else if (tokens[0].equals("GAME_AUTO_START")) + { + config.GameAutoStart = Boolean.parseBoolean(tokens[1]); + } + else if (tokens[0].equals("GAME_TIMEOUT")) + { + config.GameTimeout = Boolean.parseBoolean(tokens[1]); + } + else if (tokens[0].equals("REWARD_GEMS")) + { + config.RewardGems = Boolean.parseBoolean(tokens[1]); + } + else if (tokens[0].equals("REWARD_ITEMS")) + { + config.RewardItems = Boolean.parseBoolean(tokens[1]); + } + else if (tokens[0].equals("REWARD_STATS")) + { + config.RewardStats = Boolean.parseBoolean(tokens[1]); + } + else if (tokens[0].equals("REWARD_ACHIEVEMENTS")) + { + config.RewardAchievements = Boolean.parseBoolean(tokens[1]); + } + else if (tokens[0].equals("HOTBAR_INVENTORY")) + { + config.HotbarInventory = Boolean.parseBoolean(tokens[1]); + } + else if (tokens[0].equals("HOTBAR_HUB_CLOCK")) + { + config.HotbarHubClock = Boolean.parseBoolean(tokens[1]); + } + else if (tokens[0].equals("PLAYER_KICK_IDLE")) + { + config.PlayerKickIdle = Boolean.parseBoolean(tokens[1]); + } //Games else { @@ -233,7 +281,26 @@ public class Arcade extends JavaPlugin out.write("SERVER_TYPE=" + config.ServerType + "\n"); out.write("PLAYERS_MIN=" + config.MinPlayers + "\n"); out.write("PLAYERS_MAX=" + config.MaxPlayers + "\n"); + out.write("\nTOURNAMENT=" + config.Tournament + "\n"); + + out.write("\nTEAM_REJOIN=" + config.TeamRejoin + "\n"); + out.write("TEAM_AUTO_JOIN=" + config.TeamAutoJoin + "\n"); + out.write("TEAM_FORCE_BALANCE=" + config.TeamForceBalance + "\n"); + + out.write("\nGAME_AUTO_START=" + config.GameAutoStart + "\n"); + out.write("GAME_TIMEOUT=" + config.GameTimeout + "\n"); + + out.write("\nREWARD_GEMS=" + config.RewardGems + "\n"); + out.write("REWARD_ITEMS=" + config.RewardItems + "\n"); + out.write("REWARD_STATS=" + config.RewardStats + "\n"); + out.write("REWARD_ACHIEVEMENTS=" + config.RewardAchievements + "\n"); + + out.write("\nHOTBAR_INVENTORY=" + config.HotbarInventory + "\n"); + out.write("HOTBAR_HUB_CLOCK=" + config.HotbarHubClock + "\n"); + + out.write("\nPLAYER_KICK_IDLE=" + config.PlayerKickIdle + "\n"); + out.write("\n\nGames List;\n"); for (GameType type : GameType.values()) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index 3c8f047d6..c577e8e82 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -526,6 +526,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation public void HubClock(Player player) { + if (!IsHotbarHubClock()) + return; + if (_game != null && !_game.GiveClock) return; @@ -816,6 +819,66 @@ public class ArcadeManager extends MiniPlugin implements IRelation return _serverConfig.Tournament; } + public boolean IsTeamRejoin() + { + return _serverConfig.TeamRejoin; + } + + public boolean IsTeamAutoJoin() + { + return _serverConfig.TeamAutoJoin; + } + + public boolean IsGameAutoStart() + { + return _serverConfig.GameAutoStart; + } + + public boolean IsGameTimeout() + { + return _serverConfig.GameTimeout; + } + + public boolean IsTeamBalance() + { + return _serverConfig.TeamForceBalance; + } + + public boolean IsRewardGems() + { + return _serverConfig.RewardGems; + } + + public boolean IsRewardItems() + { + return _serverConfig.RewardItems; + } + + public boolean IsRewardStats() + { + return _serverConfig.RewardStats; + } + + public boolean IsRewardAchievements() + { + return _serverConfig.RewardAchievements; + } + + public boolean IsHotbarInventory() + { + return _serverConfig.HotbarInventory; + } + + public boolean IsHotbarHubClock() + { + return _serverConfig.HotbarHubClock; + } + + public boolean IsPlayerKickIdle() + { + return _serverConfig.PlayerKickIdle; + } + public int GetDesiredPlayerAmount() { return _serverConfig.MaxPlayers; @@ -855,6 +918,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation public void setTournamentTeam(Player player, GameTeam team) { + if (!IsTeamRejoin()) + return; + _tournamentTeam.put(player.getName(), team.GetName()); } 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 443f2c0cd..3430041b1 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 @@ -472,8 +472,7 @@ public abstract class Game implements Listener Manager.GetLobby().AddPlayerToScoreboards(player, team.GetName().toUpperCase()); //Save Tournament Team - if (Manager.IsTournamentServer()) - Manager.setTournamentTeam(player, team); + Manager.setTournamentTeam(player, team); } public GameTeam ChooseTeam(Player player) @@ -816,7 +815,7 @@ public abstract class Game implements Listener public boolean CanJoinTeam(GameTeam team) { - return (AutoBalance && !Manager.IsTournamentServer()) ? team.GetSize() < Math.max(1, UtilServer.getPlayers().length/GetTeamList().size()) : true; + return (AutoBalance && Manager.IsTeamBalance()) ? team.GetSize() < Math.max(1, UtilServer.getPlayers().length/GetTeamList().size()) : true; } public GameTeam GetTeamPreference(Player player) @@ -1095,6 +1094,9 @@ public abstract class Game implements Listener public void AddStat(Player player, String stat, int amount, boolean limitTo1, boolean global) { + if (!Manager.IsRewardStats()) + return; + if (!_stats.containsKey(player)) _stats.put(player, new HashMap()); @@ -1103,6 +1105,9 @@ public abstract class Game implements Listener else stat = GetName() + "." + stat; + if (Manager.IsTournamentServer()) + stat += ".Tournament"; + int past = 0; if (_stats.get(player).containsKey(stat)) past = _stats.get(player).get(stat); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameServerConfig.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameServerConfig.java index 01ce1d93b..10d206029 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameServerConfig.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameServerConfig.java @@ -10,8 +10,27 @@ public class GameServerConfig public int MinPlayers = -1; public int MaxPlayers = -1; public ArrayList GameList = new ArrayList(); + + //Flags public boolean Tournament = false; + public boolean TeamRejoin = false; + public boolean TeamAutoJoin = true; + public boolean TeamForceBalance = true; + + public boolean GameAutoStart = true; + public boolean GameTimeout = true; + + public boolean RewardGems = true; + public boolean RewardItems = true; + public boolean RewardStats = true; + public boolean RewardAchievements = true; + + public boolean HotbarInventory = true; + public boolean HotbarHubClock = true; + + public boolean PlayerKickIdle = true; + public boolean IsValid() { return ServerType != null && MinPlayers != -1 && MaxPlayers != -1; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameAchievementManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameAchievementManager.java index 3ed17593e..cecba6342 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameAchievementManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameAchievementManager.java @@ -1,7 +1,5 @@ package nautilus.game.arcade.managers; -import java.util.HashMap; - import mineplex.core.achievement.Achievement; import mineplex.core.achievement.AchievementData; import mineplex.core.achievement.AchievementLog; @@ -46,7 +44,7 @@ public class GameAchievementManager implements Listener @EventHandler(priority = EventPriority.MONITOR) public void processAchievementLog(final GameStateChangeEvent event) { - if (Manager.IsTournamentServer()) + if (!Manager.IsRewardAchievements()) return; if (event.GetState() != GameState.Dead) @@ -67,6 +65,9 @@ public class GameAchievementManager implements Listener public void displayAchievementLog(final Player player, Game game, NautHashMap log) { + if (!Manager.IsRewardAchievements()) + return; + if (log == null) return; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameGemManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameGemManager.java index 262e76a4b..7c3a4b666 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameGemManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameGemManager.java @@ -43,7 +43,7 @@ public class GameGemManager implements Listener @EventHandler public void PlayerKillAward(CombatDeathEvent event) { - if (Manager.IsTournamentServer()) + if (!Manager.IsRewardGems()) return; Game game = Manager.GetGame(); @@ -91,7 +91,7 @@ public class GameGemManager implements Listener @EventHandler public void PlayerQuit(PlayerQuitEvent event) { - if (Manager.IsTournamentServer()) + if (!Manager.IsRewardGems()) return; Game game = Manager.GetGame(); @@ -103,7 +103,7 @@ public class GameGemManager implements Listener @EventHandler(priority = EventPriority.MONITOR) public void PlayerStateChange(PlayerStateChangeEvent event) { - if (Manager.IsTournamentServer()) + if (!Manager.IsRewardGems()) return; if (event.GetState() != PlayerState.OUT) @@ -118,7 +118,7 @@ public class GameGemManager implements Listener @EventHandler(priority = EventPriority.MONITOR) public void GameStateChange(GameStateChangeEvent event) { - if (Manager.IsTournamentServer()) + if (!Manager.IsRewardGems()) return; if (event.GetState() != GameState.Dead) @@ -130,7 +130,7 @@ public class GameGemManager implements Listener public void RewardGems(Game game, Player player, boolean give) { - if (Manager.IsTournamentServer()) + if (!Manager.IsRewardGems()) return; //Inform Gems @@ -143,7 +143,7 @@ public class GameGemManager implements Listener public void GiveGems(Game game, Player player, HashMap gems, double gameMult) { - if (Manager.IsTournamentServer()) + if (!Manager.IsRewardGems()) return; if (gems == null) @@ -183,7 +183,7 @@ public class GameGemManager implements Listener public void AnnounceGems(Game game, Player player, HashMap gems, boolean give) { - if (Manager.IsTournamentServer()) + if (!Manager.IsRewardGems()) return; if (gems == null) 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 251c54dad..42d3a857f 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 @@ -1157,7 +1157,7 @@ public class GameLobbyManager implements IPacketRunnable, Listener @EventHandler public void InventoryUpdate(UpdateEvent event) { - if (Manager.IsTournamentServer()) + if (!Manager.IsHotbarInventory()) return; if (event.getType() != UpdateType.FAST) @@ -1182,7 +1182,7 @@ public class GameLobbyManager implements IPacketRunnable, Listener @EventHandler(priority = EventPriority.LOWEST) public void GemBoosterInteract(ActivateGemBoosterEvent event) { - if (Manager.IsTournamentServer() || Manager.GetGame() == null || Manager.GetGame().GetState() != GameState.Recruit) + if (!Manager.IsHotbarInventory() || Manager.GetGame() == null || Manager.GetGame().GetState() != GameState.Recruit) { event.setCancelled(true); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java index fc61cdc1f..b10331109 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java @@ -123,7 +123,7 @@ public class GameManager implements Listener if (game.GetCountdown() != -1) StateCountdown(game, -1, false); - else if (game.AutoStart && !Manager.IsTournamentServer()) + else if (game.AutoStart && !Manager.IsGameAutoStart()) { if (UtilServer.getPlayers().length >= Manager.GetPlayerFull()) StateCountdown(game, 20, false); @@ -160,7 +160,7 @@ public class GameManager implements Listener } else if (game.GetState() == GameState.Live) { - if (UtilTime.elapsed(game.GetStateTime(), game.GameTimeout)) + if (UtilTime.elapsed(game.GetStateTime(), game.GameTimeout) && Manager.IsGameTimeout()) { game.HandleTimeout(); } @@ -274,6 +274,9 @@ public class GameManager implements Listener @EventHandler public void StatEnableDisable(GameStateChangeEvent event) { + if (!Manager.IsRewardStats()) + return; + if (event.GetState() != GameState.Live) return; @@ -288,6 +291,9 @@ public class GameManager implements Listener @EventHandler public void StatRegister(GameStateChangeEvent event) { + if (!Manager.IsRewardStats()) + return; + if (event.GetState() != GameState.Dead) return; @@ -461,7 +467,7 @@ public class GameManager implements Listener { } - else if (!game.IsPlaying(player) && !Manager.IsTournamentServer()) + else if (!game.IsPlaying(player) && Manager.IsTeamAutoJoin()) { PlayerAdd(game, player, null); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/IdleManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/IdleManager.java index a30efc30d..8939bc9cd 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/IdleManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/IdleManager.java @@ -40,7 +40,7 @@ public class IdleManager implements Listener if (event.getType() != UpdateType.FAST) return; - if (Manager.IsTournamentServer()) + if (!Manager.IsPlayerKickIdle()) return; if (Manager.GetGame() == null) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java index a13a2a247..a52a8db5b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java @@ -113,7 +113,7 @@ public class MiscManager implements Listener @EventHandler public void HubClockUpdate(UpdateEvent event) { - if (Manager.IsTournamentServer()) + if (!Manager.IsHotbarHubClock()) return; if (event.getType() != UpdateType.FAST) @@ -137,7 +137,7 @@ public class MiscManager implements Listener @EventHandler(priority = EventPriority.LOWEST) public void HubClockInteract(PlayerInteractEvent event) { - if (Manager.IsTournamentServer()) + if (!Manager.IsHotbarHubClock()) return; Player player = event.getPlayer(); From 1bd0209b3936a2646767a432059aad30ef4f14b8 Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Sat, 30 Aug 2014 02:04:04 -0700 Subject: [PATCH 12/14] Added multi-server tags for npcs Fixed Customer support packages. Fixed Account rank expire for Hero Added SNR mod to update Rank Changed SNR mod color to gray. --- .../src/mineplex/core/common/Rank.java | 2 +- .../core/account/command/UpdateRank.java | 2 +- .../mineplex/hub/server/ServerManager.java | 13 +- .../shop/salespackage/SkillSalesPackage.java | 1 + .../salespackage/command/HeroCommand.java | 2 +- .../command/LifetimeHeroCommand.java | 2 +- .../salespackages/LifetimeHero.java | 2 +- .../salespackages/MonthlyHero.java | 2 +- .../Models/AccountAdministrator.cs | 2 +- .../LOC.Website.Web.Publish.xml | 440 +++++++++--------- Website/LOCWebsite.suo | Bin 474624 -> 474624 bytes 11 files changed, 235 insertions(+), 233 deletions(-) diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/Rank.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/Rank.java index 0a36b9ddb..c9e7b76e2 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/Rank.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/Rank.java @@ -11,7 +11,7 @@ public enum Rank OWNER("Owner", ChatColor.DARK_RED), DEVELOPER("Dev", ChatColor.RED), ADMIN("Admin", ChatColor.RED), - SNR_MODERATOR("Sr.Mod", ChatColor.GOLD), + SNR_MODERATOR("Sr.Mod", ChatColor.GRAY), MODERATOR("Mod", ChatColor.GOLD), HELPER("Helper", ChatColor.GREEN), MAPDEV("Mapper", ChatColor.BLUE), diff --git a/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java b/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java index d8c9218bd..15f9813b8 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java @@ -50,7 +50,7 @@ public class UpdateRank extends CommandBase final Rank rank = tempRank; - if (rank == Rank.MODERATOR || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV) + if (rank == Rank.MODERATOR || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV || rank == Rank.SNR_MODERATOR) { Plugin.getRepository().MatchPlayerName(new Callback>() { diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java index 12cb4aa5d..b56dabae8 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java @@ -187,7 +187,6 @@ public class ServerManager extends MiniPlugin try { Collections.sort(serverList, new ServerSorter(slots)); - boolean hasUltra = _clientManager.Get(player).GetRank().Has(Rank.ULTRA); for (ServerInfo serverInfo : serverList) { @@ -302,13 +301,15 @@ public class ServerManager extends MiniPlugin _serverInfoMap.remove(serverName); } - public void addServerGroup(String serverKey, String serverTag) + public void addServerGroup(String serverKey, String...serverTag) { _serverKeyInfoMap.put(serverKey, new HashSet()); - _serverKeyTagMap.put(serverTag, serverKey); + + for (String tag : serverTag) + _serverKeyTagMap.put(tag, serverKey); } - public void AddServerNpc(String serverNpcName, String serverTag) + public void AddServerNpc(String serverNpcName, String...serverTag) { addServerGroup(serverNpcName, serverTag); _serverNpcShopMap.put(serverNpcName, new ServerNpcShop(this, _clientManager, _donationManager, serverNpcName)); @@ -597,7 +598,7 @@ public class ServerManager extends MiniPlugin while (line != null) { String serverNpcName = line.substring(0, line.indexOf('|')).trim(); - String serverTag = line.substring(line.indexOf('|') + 1, line.indexOf('|', line.indexOf('|') + 1)).trim(); + String[] serverTags = line.substring(line.indexOf('|') + 1, line.indexOf('|', line.indexOf('|') + 1)).trim().split(","); String[] locations = line.substring(line.indexOf('|', line.indexOf('|') + 1) + 1).trim().split(","); for (String location : locations) @@ -607,7 +608,7 @@ public class ServerManager extends MiniPlugin if (!HasServerNpc(serverNpcName)) { - AddServerNpc(serverNpcName, serverTag); + AddServerNpc(serverNpcName, serverTags); } npcNames.add(serverNpcName); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/salespackage/SkillSalesPackage.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/salespackage/SkillSalesPackage.java index 880d2f845..436d82b17 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/salespackage/SkillSalesPackage.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/salespackage/SkillSalesPackage.java @@ -14,6 +14,7 @@ public class SkillSalesPackage extends SalesPackageBase super("Champions " + skill.GetName(), Material.BOOK, (byte)0, skill.GetDesc(0), skill.GetGemCost()); Free = skill.IsFree(); KnownPackage = false; + CurrencyCostMap.put(CurrencyType.Gems, skill.GetGemCost()); } @Override diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/HeroCommand.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/HeroCommand.java index 5d061fefb..0d6bb4b1a 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/HeroCommand.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/HeroCommand.java @@ -28,7 +28,7 @@ public class HeroCommand extends CommandBase Bukkit.getServer().getPluginManager().callEvent(event); resetCommandCharge(caller); - event = new PlayerCommandPreprocessEvent(caller, "/sales booster " + args[0] + " 60"); + event = new PlayerCommandPreprocessEvent(caller, "/sales booster " + args[0] + " 90"); Bukkit.getServer().getPluginManager().callEvent(event); } } diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeHeroCommand.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeHeroCommand.java index 9bf6a28ab..38676174b 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeHeroCommand.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/LifetimeHeroCommand.java @@ -27,7 +27,7 @@ public class LifetimeHeroCommand extends CommandBase Bukkit.getServer().getPluginManager().callEvent(event); resetCommandCharge(caller); - event = new PlayerCommandPreprocessEvent(caller, "/sales booster " + args[0] + " 120"); + event = new PlayerCommandPreprocessEvent(caller, "/sales booster " + args[0] + " 180"); Bukkit.getServer().getPluginManager().callEvent(event); } } diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeHero.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeHero.java index 11be30d2d..caf8b8eab 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeHero.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/LifetimeHero.java @@ -14,7 +14,7 @@ public class LifetimeHero extends SalesPackageBase public void displayToAgent(Player agent, String playerName) { addButton(agent, "/sales coin " + playerName + " 40000", " 40,000 Coins"); - addButton(agent, "/sales booster " + playerName + " 120", " 120 Gem Boosters"); + addButton(agent, "/sales booster " + playerName + " 180", " 180 Gem Boosters"); addButton(agent, "/sales rank " + playerName + " HERO true", " Lifetime Hero (Also, unlocks kits)."); addButton(agent, "Apply All", "/sales lifetimehero " + playerName, " Apply all above."); agent.sendMessage(" "); diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/MonthlyHero.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/MonthlyHero.java index 66102b208..ad82d4d83 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/MonthlyHero.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/MonthlyHero.java @@ -14,7 +14,7 @@ public class MonthlyHero extends SalesPackageBase public void displayToAgent(Player agent, String playerName) { addButton(agent, "/sales coin " + playerName + " 15000", " 15,000 Coins"); - addButton(agent, "/sales booster " + playerName + " 60", " 60 Gem Boosters"); + addButton(agent, "/sales booster " + playerName + " 90", " 90 Gem Boosters"); addButton(agent, "/sales rank " + playerName + " HERO false", " Monthly Hero."); addButton(agent, "Apply All", "/sales hero " + playerName, " Apply all above."); agent.sendMessage(" "); diff --git a/Website/LOC.Website.Common/Models/AccountAdministrator.cs b/Website/LOC.Website.Common/Models/AccountAdministrator.cs index 851a817f0..aed5208f5 100644 --- a/Website/LOC.Website.Common/Models/AccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/AccountAdministrator.cs @@ -93,7 +93,7 @@ } // Expire ranks - if ((account.Rank.Name == "ULTRA") && !account.RankPerm && DateTime.Now.CompareTo(account.RankExpire) >= 0) + if ((account.Rank.Name == "ULTRA" || account.Rank.Name == "HERO") && !account.RankPerm && DateTime.Now.CompareTo(account.RankExpire) >= 0) { account.Rank = repository.Where(x => x.Name == "ALL").First(); repository.Attach(account.Rank); diff --git a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml index 8209eb247..d6f0e2641 100644 --- a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml +++ b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml @@ -1,7 +1,6 @@  - @@ -19,18 +18,16 @@ - - + - + + - - @@ -44,27 +41,24 @@ - - - - + - - + + @@ -75,31 +69,31 @@ - - + - + + + + - - - + @@ -107,41 +101,43 @@ - + + + + + - - + - + - - - - + + - + + @@ -155,44 +151,50 @@ - + + + + + + - - + + - + - + - + + + - @@ -200,25 +202,26 @@ - + - - + + - + - + - + - + + @@ -226,51 +229,47 @@ - + - - + - - + + - - - - + + - + - - + + - - + + - + - + - @@ -281,16 +280,18 @@ - + + + - + @@ -304,26 +305,25 @@ + + - + - - - @@ -334,30 +334,29 @@ + - - + + - - + + - - @@ -365,41 +364,43 @@ - - - + + + + - + + + + - - + + - - @@ -410,130 +411,128 @@ - + - - - - + - - + - + - - + - + + - + + - + + - - + - - + + - + - + - + - + - + + - + - + + - + - + - - + + - + - - + + - - + + - + - + - @@ -546,22 +545,21 @@ - + + - - + - @@ -571,13 +569,14 @@ + - + @@ -586,8 +585,8 @@ + - @@ -598,20 +597,23 @@ + - + + - + + @@ -619,86 +621,81 @@ - - + + + - - - + - - + - + + - + - + - - + - + - - - - + - - + - - - + + + + @@ -708,95 +705,97 @@ - + + - + + - - + - + - - + + - + - + - - - + + + + - + - + + - + - + - - + + - + - - + + - - + + - + - + - @@ -809,22 +808,21 @@ - + + - - + - @@ -834,13 +832,14 @@ + - + @@ -849,8 +848,8 @@ + - @@ -861,20 +860,23 @@ + - + + - + + @@ -882,7 +884,6 @@ - @@ -891,77 +892,73 @@ + + - - - + - - + - + + - + - + - - + - + - - - - + - - + - + + @@ -971,85 +968,88 @@ - + + - + + - - + - + - - + + - + - + - - + + + - + - + + - + - + - - + + - + - - + + - - + + - + \ No newline at end of file diff --git a/Website/LOCWebsite.suo b/Website/LOCWebsite.suo index 2ad3002180581f26288f96b8758f6e75207ed54f..3f9f119c206263c33c081bccfa1582d0a37a428c 100644 GIT binary patch delta 716 zcmYL`Ur5tY6vyxV{qFs>O|wmh$(VC&BZj0Rh^10)y%+^eMZ$85U{RFxM}LtR)i0Ey z@TqH_m%z{-q=$%I@{TZBN)JJ}lHrpNDq;j?FTYAcTz3Q4fqUS5?)TpFt!d!|<5KK4=d(;!0VF8iV0*P285R~F}aA32MOTT;L$lpr$-3E!s8gs3^B+ahe9 zRCCjoBor4*&c03^=H`JEA$fZ$ZaSN-mNHou<&f?nSn(1*SoTR}^JT}F;n(p^{>z^{ zVhKoj$gV`Z_wnfYiH!mL zlheXzQVctsnkAKv%cuv{qbRzKuA@G56-7m3yAtk(=qxGOCp~B4(Rf@D<8gI$7ZMej zwt|E-wpQz7&)YoQ_-0@{1|M$F#_0r^i9$&!bz0xb$J6o%aFkNN*m2XQ&WttC2Wf=j zqjE}_O$l?5rYxjRmf0N(bBMMbCoQ>JpQEWF;*&12_nN$y0u%+;cIleUGQ21{7s!{FE!4TwOcwwyN^+Q4`U!by4y7XDy6csq%c zb=BF$s|L-89ejCV^WK+Ll`Q%8FWP>7$A0-&Iz0goI@C+B!j)p^4&y^&eM@sk{sED$ B?z8{^ delta 1004 zcmZuvTS!zv7@j$2W?gr~)=L_;Y3LRfQ4~s>Dt<67cwn7r5MriLKi5A z9cv;Y%9kVpb%z`?v(4xsh$Il7e2}nush~Jr3GF|-95d)Yd}l8I_sx9gKfnIlt^aoS zbg1|^yQ;3lXV`N!o1R7p<*<+HS)1$K_0{KwL<8A{+3T+5Oiv=>2Q4Ke6DS-PD>+Pa z_$c9!KWs2ITb0PFSp*e$;!`6#MK`%w+5MU_A?;}ql;3vX3>x?P23A|UEh z7)?G0d)B&*U1<|hhg!QqNOv4UqV{6P9zNWpH&}k^V*rS$<@-O!> zKQ^J{irjB6arl?MjD^aQ_)QOZcwGgsA;^O1ff5@gOnob%2AgQ;C8Mcc($A&1jtwWS@%KY5b2MMuj(T z*`hAQ*Z9+8w6HHi1}oS1z&X8uu=(o%{eTC6K7a&FK_@+gaRBfLFbH@I7y?YmpKiL< zA8WUKsB5%0xYkU4W=}|?nU31YS}P%qHd?-coG^Wu%`UZJI+{%UR-S8P)E7G}YldTt z(Mu%sR_`096|TfEaAV<)48VMoto=aCi`cN=d+ihTNY4t}xHG;6?Smp5Mj9_{#827n zGGexuhv$?)g}Zps2tCPPea9}o$WKyORlZB!E3oO|w7d(S16g^O9bFxp-$#Z~z;rP^ Y-N{=j)PsCND5*S9gqO(4Pd2yj50*JB5C8xG From 37679117180ee64083bec4f14ec7e47d88dc7bcb Mon Sep 17 00:00:00 2001 From: Chiss Date: Sat, 30 Aug 2014 19:07:43 +1000 Subject: [PATCH 13/14] updated game desc output --- .../src/nautilus/game/arcade/game/Game.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3430041b1..78ed62c1d 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 @@ -883,7 +883,7 @@ public abstract class Game implements Listener for (String line : this.GetDesc()) { - UtilPlayer.message(player, C.cWhite + "- " + line); + UtilPlayer.message(player, C.cWhite + " " + line); } UtilPlayer.message(player, ""); From 2b333859d1e73b48ce1a9f69abc6b35e9eb8c97e Mon Sep 17 00:00:00 2001 From: Chiss Date: Sat, 30 Aug 2014 19:24:04 +1000 Subject: [PATCH 14/14] PUUSH --- .../src/nautilus/game/arcade/managers/GameManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java index b10331109..fc421c197 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java @@ -123,7 +123,7 @@ public class GameManager implements Listener if (game.GetCountdown() != -1) StateCountdown(game, -1, false); - else if (game.AutoStart && !Manager.IsGameAutoStart()) + else if (game.AutoStart && Manager.IsGameAutoStart()) { if (UtilServer.getPlayers().length >= Manager.GetPlayerFull()) StateCountdown(game, 20, false);