diff options
Diffstat (limited to 'src/main/java/com/MylesAndMore/tumble')
-rw-r--r-- | src/main/java/com/MylesAndMore/tumble/Game.java | 6 | ||||
-rw-r--r-- | src/main/java/com/MylesAndMore/tumble/Main.java | 6 | ||||
-rw-r--r-- | src/main/java/com/MylesAndMore/tumble/commands/StartGame.java | 19 |
3 files changed, 4 insertions, 27 deletions
diff --git a/src/main/java/com/MylesAndMore/tumble/Game.java b/src/main/java/com/MylesAndMore/tumble/Game.java index fd7e1a1..ccbbc55 100644 --- a/src/main/java/com/MylesAndMore/tumble/Game.java +++ b/src/main/java/com/MylesAndMore/tumble/Game.java @@ -153,9 +153,6 @@ public class Game { // While there are still players in the lobby, send them to the gameWorld // This is just a way of sending everybody in the lobby to the game for (Player aPlayer : TumbleManager.getPlayersInLobby()) { - //for (List<Player> playersInLobby = TumbleManager.getPlayersInLobby(); playersInLobby.size() > 0; playersInLobby = TumbleManager.getPlayersInLobby()) { - // Get a singular player from the player list - //Player aPlayer = playersInLobby.get(0); // Get a singular location from the scatter list Location aLocation = scatterLocations.get(0); // Teleport that player to that scatter location @@ -175,6 +172,7 @@ public class Game { // otherwise, the game must have two people left (and one just died), meaning it is over // This logic is so that it will not remove the last player standing from the list, so we know who the winner is. else { + gamePlayers.remove(player); // End the game, passing the winner to the gameEnd method gameEnd(gamePlayers.get(0)); } @@ -198,6 +196,6 @@ public class Game { // Methods to get the game type and game state for other classes outside the Game private String getGameType() { return gameType; } - private String getGameState() { return gameState; } + public String getGameState() { return gameState; } }
\ No newline at end of file diff --git a/src/main/java/com/MylesAndMore/tumble/Main.java b/src/main/java/com/MylesAndMore/tumble/Main.java index 2a276d4..4ef6585 100644 --- a/src/main/java/com/MylesAndMore/tumble/Main.java +++ b/src/main/java/com/MylesAndMore/tumble/Main.java @@ -1,9 +1,7 @@ package com.MylesAndMore.tumble; -import com.MylesAndMore.tumble.commands.ReloadCommand; +import com.MylesAndMore.tumble.commands.*; import com.MylesAndMore.tumble.api.Metrics; -import com.MylesAndMore.tumble.commands.SetWorldConfig; -import com.MylesAndMore.tumble.commands.StartGame; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; @@ -34,6 +32,6 @@ public class Main extends JavaPlugin{ } // Init message - Bukkit.getServer().getLogger().info("[tumble] tumble initialization complete!"); + Bukkit.getServer().getLogger().info("[tumble] Tumble initialization complete!"); } }
\ No newline at end of file diff --git a/src/main/java/com/MylesAndMore/tumble/commands/StartGame.java b/src/main/java/com/MylesAndMore/tumble/commands/StartGame.java index aad4b9e..85fd705 100644 --- a/src/main/java/com/MylesAndMore/tumble/commands/StartGame.java +++ b/src/main/java/com/MylesAndMore/tumble/commands/StartGame.java @@ -12,7 +12,6 @@ import org.bukkit.entity.Player; import java.util.List; public class StartGame implements CommandExecutor { - // Define the startGame method so that other classes can refrence it public void startGame(CommandSender sender, String[] args) { // Check if sender has perms to run command if (sender.hasPermission("tumble.start")) { @@ -60,24 +59,6 @@ public class StartGame implements CommandExecutor { } } - public void sendWorld() { - // Create Locations to scatter players around the first layer - - // While there are still players in the lobby, send them to the gameWorld - // This is just a way of sending everybody in the lobby to the game - for (List<Player> playersInLobby = TumbleManager.getPlayersInLobby(); playersInLobby.size() > 0; playersInLobby = TumbleManager.getPlayersInLobby()) { - // Get a singular player from the player list - Player aPlayer = playersInLobby.get(0); - // Teleport that player to the spawn of the gameWorld - aPlayer.teleport(Bukkit.getWorld(TumbleManager.getGameWorld()).getSpawnLocation()); - } - - // Add a little break because it can take the clients a bit to load into the new world - // Then, transition to another method because this one is getting really long - // In that method: set a flag to monitor the playerDeathEvent so we know when all the players have died - // Also start music - } - @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { startGame(sender, args); |