From 507d3563461995ebdaecc24fbab019aa605da166 Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Tue, 26 Aug 2014 17:40:58 -0500 Subject: [PATCH 1/7] Fix last achievement typo --- .../src/mineplex/core/achievement/Achievement.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java index 32ad9dba6..b8d9f8816 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java @@ -372,7 +372,7 @@ public enum Achievement //Death Tag DEATH_TAG_WINS("Death Proof", 600, new String[] {"Death Tag.Wins"}, - new String[] {"Win 50 games of Turf Wars"}, + new String[] {"Win 50 games of Death Tag"}, new int[] {50}, AchievementCategory.DEATH_TAG), From f9ce0d353c8d3c4a87c9facb759fb563e72379db Mon Sep 17 00:00:00 2001 From: Chiss Date: Wed, 27 Aug 2014 08:57:11 +1000 Subject: [PATCH 2/7] Achievements now need 75%+ players at START of game --- .../src/nautilus/game/arcade/game/Game.java | 2 ++ .../nautilus/game/arcade/managers/GameManager.java | 14 ++++++++++++++ .../nautilus/game/arcade/stats/StatTracker.java | 2 +- 3 files changed, 17 insertions(+), 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 d77a2b868..b79839c7f 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 @@ -207,6 +207,8 @@ public abstract class Game implements Listener public boolean EloRanking = false; public int EloStart = 1000; + public boolean CanAddStats = true; + public ArrayList GemBoosters = new ArrayList(); private final Set> _statTrackers = new HashSet<>(); 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 14de468dd..77035d669 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 @@ -271,6 +271,20 @@ public class GameManager implements Listener event.GetGame().DeregisterKits(); } + @EventHandler + public void StatEnableDisable(GameStateChangeEvent event) + { + if (event.GetState() != GameState.Live) + return; + + int requirement = (int)((double)event.GetGame().Manager.GetPlayerFull() * 0.75d); + + event.GetGame().CanAddStats = (double)event.GetGame().GetPlayers(true).size() >= requirement; + + if (!event.GetGame().CanAddStats) + event.GetGame().Announce(C.Bold + "Stats/Achievements Disabled. Requires " + requirement + " Players."); + } + @EventHandler public void StatRegister(GameStateChangeEvent event) { 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 704e355ad..1c7630a6c 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 @@ -21,7 +21,7 @@ public class StatTracker implements Listener public boolean canAddStats() { - return getGame().GetPlayers(false).size() * 4 >= 3 * getGame().Manager.GetPlayerFull(); + return getGame().CanAddStats; } public void addStat(Player player, String stat, int value, boolean limitTo1, boolean global) From 5540835052a049456267166b3949d392688f6174 Mon Sep 17 00:00:00 2001 From: Chiss Date: Wed, 27 Aug 2014 09:09:06 +1000 Subject: [PATCH 3/7] removed micro debug fixed a bug in achievement output --- .../src/nautilus/game/arcade/game/games/micro/Micro.java | 4 ++-- .../nautilus/game/arcade/managers/GameAchievementManager.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/micro/Micro.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/micro/Micro.java index 9d816df01..780517b8a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/micro/Micro.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/micro/Micro.java @@ -101,7 +101,7 @@ public class Micro extends TeamGame if (_blocks.isEmpty()) return; - TimingManager.start("Block Fall"); + //TimingManager.start("Block Fall"); for (int i = 0 ; i < 3 ; i++) { @@ -134,7 +134,7 @@ public class Micro extends TeamGame } } - TimingManager.stop("Block Fall"); + //TimingManager.stop("Block Fall"); } @EventHandler 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 df07b0848..1d9dac378 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 @@ -95,9 +95,9 @@ public class GameAchievementManager implements Listener boolean displayDesc = true; //Completed Achievement - if (data.getLevel() == type.getMaxLevel()) + if (data.getLevel() >= type.getMaxLevel()) { - //Finishing for the first time + //Finishing for the first time if (!Manager.GetTaskManager().hasCompletedTask(player, type.getName())) { UtilPlayer.message(player, nameLevel + " " + F.elem(C.cAqua + C.Bold + "Completed!") + From b508cd036c8d12af28a68b0c4a9a5b284790574d Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Tue, 26 Aug 2014 18:36:40 -0500 Subject: [PATCH 4/7] Lazy fix so that polls award gems instead of coins --- .../Mineplex.Hub/src/mineplex/hub/poll/PollManager.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollManager.java index 4c27183fd..e770295d9 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollManager.java @@ -85,6 +85,9 @@ public class PollManager extends MiniClientPlugin if (event.getType() != UpdateType.SLOW) return; + if (_polls.size() == 0) + return; + for (Player player : _plugin.getServer().getOnlinePlayers()) { PlayerPollData pollData = Get(player); @@ -147,7 +150,7 @@ public class PollManager extends MiniClientPlugin } } player.sendMessage(""); - player.sendMessage("Click an answer to receive " + C.cYellow + poll.getCoinReward() + " Coins"); + player.sendMessage("Click an answer to receive " + C.cGreen + poll.getCoinReward() + " Gems"); player.sendMessage(C.cGold + C.Bold + "--------------------------"); player.playSound(player.getEyeLocation(), Sound.ORB_PICKUP, 2f, 0f); @@ -173,7 +176,7 @@ public class PollManager extends MiniClientPlugin if (_repository.addPollAnswer(uuid, poll.getId(), answer)) { // Poll response successful, give coins - _donationManager.RewardCoins(new Callback() + _donationManager.RewardGems(new Callback() { @Override public void run(Boolean completed) @@ -184,7 +187,7 @@ public class PollManager extends MiniClientPlugin @Override public void run() { - UtilPlayer.message(player, F.main("Coin", "You received " + F.elem(poll.getCoinReward() + "") + " coins!")); + UtilPlayer.message(player, F.main("Gem", "You received " + F.elem(poll.getCoinReward() + "") + " Gems!")); } }); } From 78eee685921891e67f9f373cc99e25ad34c19dfb Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Tue, 26 Aug 2014 18:39:01 -0500 Subject: [PATCH 5/7] Change achievement icons, fix another typo --- .../src/mineplex/core/achievement/Achievement.java | 2 +- .../src/mineplex/core/achievement/ui/page/AchievementPage.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java index b8d9f8816..2b2aeda75 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/Achievement.java @@ -184,7 +184,7 @@ public enum Achievement AchievementCategory.CASTLE_SIEGE), CASTLE_SIEGE_KINGSLAYER("Kingslayer", 800, - new String[] {"Castle Siege.Kingslayer"}, + new String[] {"Castle Siege.KingSlayer"}, new String[] {"Get the killing blow on the King"}, new int[] {1}, AchievementCategory.CASTLE_SIEGE), diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementPage.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementPage.java index c962fe248..30054bcc5 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementPage.java @@ -103,7 +103,7 @@ public class AchievementPage extends ShopPageBase Date: Wed, 27 Aug 2014 09:52:33 +1000 Subject: [PATCH 6/7] Fixed 1v3 achievement not giving achievement if players quit (required 4 at END) --- .../game/arcade/managers/GameAchievementManager.java | 2 +- .../nautilus/game/arcade/stats/OneVThreeStatTracker.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) 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 1d9dac378..19b7dd2a1 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 @@ -93,7 +93,7 @@ public class GameAchievementManager implements Listener String progress = F.elem(C.cGreen + "+" + log.get(type).Amount); boolean displayDesc = true; - + //Completed Achievement if (data.getLevel() >= type.getMaxLevel()) { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/OneVThreeStatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/OneVThreeStatTracker.java index 70b50b66d..a10e62288 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/OneVThreeStatTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/OneVThreeStatTracker.java @@ -63,11 +63,7 @@ public class OneVThreeStatTracker extends StatTracker { if (event.GetState() == Game.GameState.End) { - List players = getGame().GetPlayers(false); - if (players.size() >= 4) - return; - - for (Player player : players) + for (Player player : getGame().GetPlayers(false)) { Integer killCount = _killCount.get(player.getUniqueId()); From 8439838328e78804aed62c80f2c672616ad04c44 Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Tue, 26 Aug 2014 19:01:59 -0500 Subject: [PATCH 7/7] After years of research and experimenting, we settled on an achievement icon --- .../mineplex/core/achievement/ui/page/AchievementPage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementPage.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementPage.java index 30054bcc5..0615dd7b4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementPage.java @@ -70,7 +70,7 @@ public class AchievementPage extends ShopPageBase