Reject invalid tile configs

This commit is contained in:
Anuken 2023-11-23 06:28:57 -05:00
parent b189bfdf44
commit 4076a146b1

View File

@ -615,7 +615,9 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
@Remote(targets = Loc.both, called = Loc.both, forward = true)
public static void tileConfig(@Nullable Player player, Building build, @Nullable Object value){
if(build == null && net.server()) throw new ValidateException(player, "building is null");
if(build == null) return;
if(net.server() && (!Units.canInteract(player, build) ||
!netServer.admins.allowAction(player, ActionType.configure, build.tile, action -> action.config = value))){