Skip to content

Commit

Permalink
hope to fix map more now maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
database-test committed Oct 26, 2024
1 parent 3b77de8 commit 37a2c5f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/com/nexia/minigames/games/bridge/BridgeGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ public class BridgeGame {
public static ArrayList<NexiaPlayer> queue = new ArrayList<>();
public static boolean isStarted = false;
public static boolean isEnding = false;
public static UUID gameUUID = UUID.randomUUID();
private static BridgeTeam winnerTeam = null;
private static int endTime = 5;


public static void leave(NexiaPlayer player) {
BridgePlayerData data = (BridgePlayerData) PlayerDataManager.getDataManager(BRIDGE_DATA_MANAGER).get(player);
BridgeGame.spectator.remove(player);
Expand Down Expand Up @@ -162,8 +162,8 @@ public static void giveKit(NexiaPlayer player) {
player.unwrap().setSlot(0, sword);
player.unwrap().setSlot(1, bow);
player.unwrap().setSlot(2, arrow);
player.unwrap().setSlot(3, blocks);
player.unwrap().setSlot(4, blocks);
player.unwrap().setSlot(5, blocks);
player.unwrap().setSlot(6, pickaxe);
player.unwrap().setSlot(8, gap);

Expand All @@ -184,10 +184,11 @@ public static void second() {
for (NexiaPlayer player : BridgeGame.getViewers()) {
player.runCommand("/hub", 0, false);
}

deleteWorld(gameUUID.toString());
BridgeGame.resetAll();
}


BridgeGame.endTime--;
} else {
BridgeGame.updateInfo();
Expand Down Expand Up @@ -348,6 +349,9 @@ public static void joinQueue(NexiaPlayer player) {
}

public static void endGame(BridgeTeam winnerTeam) {

deleteWorld(gameUUID.toString());

BridgeGame.isEnding = true;

if (winnerTeam == null) {
Expand Down Expand Up @@ -658,7 +662,7 @@ public static void deleteWorld(String id) {

public static void firstTick() {
resetAll();
UUID gameUUID = UUID.randomUUID();

map.structureMap.pasteMap(createWorld(gameUUID.toString(), true));
}

Expand Down

0 comments on commit 37a2c5f

Please sign in to comment.