From 6edc1d75601d2060377b22bf3ccbe4e71eed25a4 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 15 Sep 2018 16:20:41 +0100 Subject: [PATCH] Fix some last minute things --- .../src/mineplex/game/nano/cycle/GameCycle.java | 2 +- .../components/currency/GameCurrencyManager.java | 10 +++++----- .../game/components/player/GamePlayerManager.java | 12 ++++++++++++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Plugins/Mineplex.Game.Nano/src/mineplex/game/nano/cycle/GameCycle.java b/Plugins/Mineplex.Game.Nano/src/mineplex/game/nano/cycle/GameCycle.java index c4a0f3080..35e842a9f 100644 --- a/Plugins/Mineplex.Game.Nano/src/mineplex/game/nano/cycle/GameCycle.java +++ b/Plugins/Mineplex.Game.Nano/src/mineplex/game/nano/cycle/GameCycle.java @@ -110,7 +110,7 @@ public class GameCycle extends GameManager cancel(); } } - }, 20, 10); + }, 10, 10); } } diff --git a/Plugins/Mineplex.Game.Nano/src/mineplex/game/nano/game/components/currency/GameCurrencyManager.java b/Plugins/Mineplex.Game.Nano/src/mineplex/game/nano/game/components/currency/GameCurrencyManager.java index 27db0f9a4..b95bc2309 100644 --- a/Plugins/Mineplex.Game.Nano/src/mineplex/game/nano/game/components/currency/GameCurrencyManager.java +++ b/Plugins/Mineplex.Game.Nano/src/mineplex/game/nano/game/components/currency/GameCurrencyManager.java @@ -98,6 +98,11 @@ public class GameCurrencyManager extends GameManager implements CurrencyComponen if (data != null) { data.Games++; + + if (data.Games == 100) + { + event.getGame().addStat(player, "PlayInARow", 1, true, false); + } } } } @@ -196,11 +201,6 @@ public class GameCurrencyManager extends GameManager implements CurrencyComponen statsManager.incrementStat(player, gameName + ".ExpEarned", exp); statsManager.incrementStat(player, "Global.GamesPlayed", gamesPlayed); require(TrackManager.class).getTrack(GemCollectorTrack.class).earnedGems(player, gems); - - if (data.Games >= 100) - { - statsManager.incrementStat(player, gameName + ".PlayInARow", 1); - } } // Remove from session diff --git a/Plugins/Mineplex.Game.Nano/src/mineplex/game/nano/game/components/player/GamePlayerManager.java b/Plugins/Mineplex.Game.Nano/src/mineplex/game/nano/game/components/player/GamePlayerManager.java index 9b534e75a..a0cbc2728 100644 --- a/Plugins/Mineplex.Game.Nano/src/mineplex/game/nano/game/components/player/GamePlayerManager.java +++ b/Plugins/Mineplex.Game.Nano/src/mineplex/game/nano/game/components/player/GamePlayerManager.java @@ -19,6 +19,7 @@ import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.gadget.event.GadgetEnableEvent; import mineplex.core.gadget.persistence.UserGadgetPersistence; +import mineplex.core.pet.event.PetSpawnEvent; import mineplex.core.teleport.event.MineplexTeleportEvent; import mineplex.game.nano.GameManager; import mineplex.game.nano.game.Game.GameState; @@ -190,6 +191,17 @@ public class GamePlayerManager extends GameManager implements ComponentHook