2
0
Эх сурвалжийг харах

fixing server end error when no game world has been created yet

RedstoneFuture 3 жил өмнө
parent
commit
767ef80700

+ 7 - 2
missilewars-plugin/src/main/java/de/butzlabben/missilewars/game/Game.java

@@ -319,12 +319,17 @@ public class Game {
         stopTimer();
 
         applyForAllPlayers(player -> player.teleport(lobby.getAfterGameSpawn()));
-        if (gameWorld.getWorldName() != null) {
+
+        if (gameWorld != null) {
             gameWorld.sendPlayersBack();
             gameWorld.unload();
             gameWorld.delete();
         }
-        scoreboardManager.removeScoreboard();
+
+        if (scoreboardManager != null) {
+            scoreboardManager.removeScoreboard();
+        }
+
         team1 = null;
         team2 = null;
     }