diff options
author | Myles <mylesandmore9@gmail.com> | 2022-12-03 16:34:13 -0600 |
---|---|---|
committer | Myles <mylesandmore9@gmail.com> | 2022-12-03 16:34:13 -0600 |
commit | 6be45c6cdfb243fc872b7073729a755f8f1ee193 (patch) | |
tree | bc12e53df6cea5d0ce1fc635a4e4fed22638bd67 | |
parent | d2c33ffb6258e3197f455035087c3bb5a1b0d662 (diff) | |
download | Tumble-6be45c6cdfb243fc872b7073729a755f8f1ee193.tar.gz Tumble-6be45c6cdfb243fc872b7073729a755f8f1ee193.tar.bz2 Tumble-6be45c6cdfb243fc872b7073729a755f8f1ee193.zip |
carver is too good at bug fixing
-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 | ||||
-rw-r--r-- | src/main/resources/config.yml | 4 |
4 files changed, 6 insertions, 29 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); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index b2ba268..a881556 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -7,8 +7,8 @@ permissionMessage: You do not have permission to perform this command! # Customize the game mode of Tumble # Acceptable options include: shovels, snowballs, mixed -# Default is shovels -gameMode: shovels +# Default is mixed +gameMode: mixed # This tells the plugin which worlds it should use as the lobby/game worlds # Do NOT change unless you know what you're doing!! |