Przeglądaj źródła

Fix: cancelling vanilla sign-editor opening before teleport

RedstoneFuture 1 rok temu
rodzic
commit
02d073062a

+ 4 - 1
missilewars-plugin/src/main/java/de/butzlabben/missilewars/listener/SignListener.java

@@ -53,7 +53,10 @@ public class SignListener implements Listener {
         
         Game game = GameManager.getInstance().getGame(sign.getLobby());
         if (game == null) return;
-
+        
+        // Cancel the event so that the Vanilla sign-edit GUI is not opened before the teleport.
+        event.setCancelled(true);
+        
         game.teleportToLobbySpawn(event.getPlayer());
     }