From 6dd8903e03e690f62c294485a8616b90985141ec Mon Sep 17 00:00:00 2001 From: Oth3r Date: Tue, 23 Jul 2024 11:02:02 -0500 Subject: [PATCH] sit-while-seated logic --- src/main/java/one/oth3r/sit/utl/Logic.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/one/oth3r/sit/utl/Logic.java b/src/main/java/one/oth3r/sit/utl/Logic.java index 762f32b..8afb29c 100644 --- a/src/main/java/one/oth3r/sit/utl/Logic.java +++ b/src/main/java/one/oth3r/sit/utl/Logic.java @@ -17,6 +17,9 @@ public class Logic { // cant sit if crouching if (player.isSneaking()) return false; + // if sitting on a stair and sit while seated off, false + if (Data.getSitEntity(player) != null && !Data.getServerConfig().isSitWhileSeated()) return false; + // if hit result isnt null (check the hands of the player) & the player hand checker returns false (can't sit with the items in the hand), quit if (hitResult != null) { if (!checkHands(player)) return false;