Browse Source

Adding notes about execution order

RedstoneFuture 1 year ago
parent
commit
19de1d5a4a

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

@@ -440,8 +440,10 @@ public class Game {
     }
     }
 
 
     public void resetGame() {
     public void resetGame() {
+        // Teleporting players; the event listener will handle the teleport event
         applyForAllPlayers(this::teleportToAfterGameSpawn);
         applyForAllPlayers(this::teleportToAfterGameSpawn);
         
         
+        // Deactivation of all event handlers
         HandlerList.unregisterAll(listener);
         HandlerList.unregisterAll(listener);
         taskManager.stopTimer();
         taskManager.stopTimer();