mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-20 00:13:21 +02:00
sit-while-seated logic
This commit is contained in:
parent
4558367eab
commit
6dd8903e03
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue