This commit is contained in:
Ilya246
2022-06-14 04:49:13 +04:00
committed by GitHub
parent 1be8f11ec8
commit 58bfd0e46c
5 changed files with 7 additions and 5 deletions

View File

@@ -475,7 +475,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
if(player == null) return;
//make sure player is allowed to control the unit
if(net.server() && !netServer.admins.allowAction(player, ActionType.control, action -> action.unit = unit)){
if(net.server() && (!state.rules.possessionAllowed || !netServer.admins.allowAction(player, ActionType.control, action -> action.unit = unit))){
throw new ValidateException(player, "Player cannot control a unit.");
}