aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyles <mylesandmore9@gmail.com>2022-12-02 23:30:04 -0600
committerMyles <mylesandmore9@gmail.com>2022-12-02 23:30:04 -0600
commit23531b7610aa1a8a10cce2a355ad0fad76d8d230 (patch)
treebb75a70195659f5ae059790f80c2141929a584ab
parent3a8fcb3aaec9d1c43f9d7a2f04cdbfb5b43696b3 (diff)
downloadTumble-23531b7610aa1a8a10cce2a355ad0fad76d8d230.tar.gz
Tumble-23531b7610aa1a8a10cce2a355ad0fad76d8d230.tar.bz2
Tumble-23531b7610aa1a8a10cce2a355ad0fad76d8d230.zip
slight reformat in StartGame for the Game management refactors
-rw-r--r--src/main/java/com/MylesAndMore/tumble/commands/StartGame.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/com/MylesAndMore/tumble/commands/StartGame.java b/src/main/java/com/MylesAndMore/tumble/commands/StartGame.java
index 9daa959..df5f316 100644
--- a/src/main/java/com/MylesAndMore/tumble/commands/StartGame.java
+++ b/src/main/java/com/MylesAndMore/tumble/commands/StartGame.java
@@ -1,6 +1,6 @@
package com.MylesAndMore.tumble.commands;
-import com.MylesAndMore.tumble.GameManager;
+import com.MylesAndMore.tumble.Game;
import com.MylesAndMore.tumble.TumbleManager;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@@ -19,7 +19,7 @@ public class StartGame implements CommandExecutor {
// Check if there is a lobbyWorld specified in config
if (TumbleManager.getLobbyWorld() != null) {
// Check if there is more than one person in lobby
- if (TumbleManager.getPlayersInLobby().size() > 1) {
+ if (TumbleManager.getPlayersInLobby().size() > 0) {
// Check if there is a gameWorld specified in config
if (TumbleManager.getGameWorld() != null) {
sender.sendMessage("Checking world, this could take a few moments...");
@@ -28,12 +28,7 @@ public class StartGame implements CommandExecutor {
if (TumbleManager.getMVWorldManager().loadWorld(TumbleManager.getGameWorld())) {
sender.sendMessage("Generating layers...");
// Check which gamemode to initiate from the config file
- if (GameManager.createGame(TumbleManager.getPlugin().getConfig().getString("gameMode"))) {
- // If game type exists, send players to the world
- // At this point, layers have been generated, and items have been allotted from the createGame method
- sendWorld();
- }
- else {
+ if (!Game.getGame().startGame()) {
// If game type does not exist, give sender feedback
sender.sendMessage(ChatColor.RED + "Failed to recognize game of type " + ChatColor.GRAY + TumbleManager.getPlugin().getConfig().getString("gameMode"));
}