From 50a94af0d112925df358ab25cc65199fd6c553af Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 6 Sep 2020 09:07:51 -0400 Subject: [PATCH] Fixed #2500 --- core/src/mindustry/input/InputHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index 005e9b0f17..07c937db68 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -173,6 +173,8 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ @Remote(targets = Loc.both, called = Loc.server, forward = true, unreliable = true) public static void rotateBlock(Player player, Building tile, boolean direction){ + if(tile == null) return; + if(net.server() && (!Units.canInteract(player, tile) || !netServer.admins.allowAction(player, ActionType.rotate, tile.tile(), action -> action.rotation = Mathf.mod(tile.rotation + Mathf.sign(direction), 4)))){ throw new ValidateException(player, "Player cannot rotate a block.");