diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 5711bdd..30f9b89 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -23,24 +23,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
@@ -77,17 +63,17 @@
-
-
-
-
-
+
+
+
+
+
@@ -103,6 +89,7 @@
+
@@ -171,34 +158,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/java/rip/tilly/bedwars/BedWars.java b/src/main/java/rip/tilly/bedwars/BedWars.java
index 1b48bf8..5f52723 100644
--- a/src/main/java/rip/tilly/bedwars/BedWars.java
+++ b/src/main/java/rip/tilly/bedwars/BedWars.java
@@ -8,6 +8,7 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
+import rip.tilly.bedwars.game.Game;
import rip.tilly.bedwars.listeners.game.*;
import rip.tilly.bedwars.listeners.*;
import rip.tilly.bedwars.managers.CommandManager;
@@ -30,6 +31,8 @@ import rip.tilly.bedwars.utils.config.file.Config;
import java.util.Arrays;
import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
/**
* Created by Lucanius & Trixkz
@@ -94,6 +97,11 @@ public final class BedWars extends JavaPlugin {
public void onDisable() {
instance = null;
+ for (Map.Entry entry : this.gameManager.getGames().entrySet()) {
+ Game game = entry.getValue();
+ this.chunkClearingManager.resetArena(game.getCopiedArena());
+ }
+
for (World world : Bukkit.getWorlds()) {
for (Entity entity : world.getEntities()) {
if (entity.getType() == EntityType.DROPPED_ITEM) {
diff --git a/src/main/java/rip/tilly/bedwars/listeners/game/GameStartListener.java b/src/main/java/rip/tilly/bedwars/listeners/game/GameStartListener.java
index 7a098a5..3c2869f 100644
--- a/src/main/java/rip/tilly/bedwars/listeners/game/GameStartListener.java
+++ b/src/main/java/rip/tilly/bedwars/listeners/game/GameStartListener.java
@@ -9,6 +9,7 @@ import rip.tilly.bedwars.events.GameStartEvent;
import rip.tilly.bedwars.game.Game;
import rip.tilly.bedwars.game.GameType;
import rip.tilly.bedwars.playerdata.PlayerData;
+import rip.tilly.bedwars.playerdata.PlayerState;
import rip.tilly.bedwars.runnables.GameRunnable;
import rip.tilly.bedwars.utils.CC;
import rip.tilly.bedwars.utils.CustomLocation;
@@ -47,6 +48,8 @@ public class GameStartListener implements Listener {
playerData.setTeamId(team.getId());
playerData.setPlayerTeam(team.getPlayerTeam());
+ playerData.setPlayerState(PlayerState.PLAYING);
+
CustomLocation locationA = game.getCopiedArena().getA();
CustomLocation locationB = game.getCopiedArena().getB();