From 5c8b550d6f608b08c983b4a113d06bde7f342f80 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 16 Aug 2018 13:56:49 +0100 Subject: [PATCH] Alex's Changes and prevent /game start working with no map --- .../ui/server/ChampionsServerSelectionPage.java | 9 +++++++-- .../nautilus/game/arcade/command/MapCommand.java | 2 +- .../nautilus/game/arcade/command/StartCommand.java | 13 ++++++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/server/ChampionsServerSelectionPage.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/server/ChampionsServerSelectionPage.java index da1dd7201..440395d04 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/server/ChampionsServerSelectionPage.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/server/ChampionsServerSelectionPage.java @@ -27,7 +27,9 @@ public class ChampionsServerSelectionPage extends ServerModeSelectionPage .setTitle(C.cYellowB + "Champions " + C.cGoldB + "Dominate") .addLore( "", - "TODO", + "Select your champion and battle in a 5v5", + "custom non-vanilla PvP game!", + "Capture points & pick up gems to win.", "", CLICK_TO_PLAY ) @@ -37,7 +39,10 @@ public class ChampionsServerSelectionPage extends ServerModeSelectionPage .setTitle(C.cYellowB + "Champions " + C.cGoldB + "CTF") .addLore( "", - "TODO", + "Select your champion and battle in an 8v8", + "custom non-vanilla PvP game!", + "Steal the enemy’s flag and bring it to your base", + "5 times to win.", "", CLICK_TO_PLAY ) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/MapCommand.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/MapCommand.java index bc191c34f..e941b5f09 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/MapCommand.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/MapCommand.java @@ -24,7 +24,7 @@ public class MapCommand extends CommandBase if (game == null || game.WorldData == null || game.WorldData.MapName == null) { - caller.sendMessage(F.main(Plugin.getName(), "Is this the work of an enemy stand? There's no map?")); + caller.sendMessage(F.main(Plugin.getName(), "There is currently no map running.")); return; } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/StartCommand.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/StartCommand.java index 54d2c3857..cff48c06e 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/StartCommand.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/StartCommand.java @@ -7,6 +7,7 @@ import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; import nautilus.game.arcade.ArcadeManager; +import nautilus.game.arcade.game.Game; import nautilus.game.arcade.game.Game.GameState; public class StartCommand extends CommandBase @@ -24,7 +25,17 @@ public class StartCommand extends CommandBase return; } - if (Plugin.GetGame() == null || Plugin.GetGame().GetState() == GameState.Loading) + Game game = Plugin.GetGame(); + + if (game == null) + { + caller.sendMessage(F.main("Game", "There is currently no game running!")); + return; + } + + GameState state = game.GetState(); + + if (state == GameState.PreLoad || state == GameState.Loading) { UtilPlayer.message(caller, F.main("Game", "The game is currently loading, it cannot be started!")); return;