isSitWhileSeated -> canSitWhileSeated + better sitWhileSeated logic

This commit is contained in:
Oth3r 2024-08-26 14:39:08 -05:00
commit e2b1a5f414
2 changed files with 3 additions and 3 deletions

View file

@ -69,7 +69,7 @@ public class ServerConfig {
return keepActive; return keepActive;
} }
public boolean isSitWhileSeated() { public boolean canSitWhileSeated() {
return sitWhileSeated; return sitWhileSeated;
} }

View file

@ -17,8 +17,8 @@ public class Logic {
// cant sit if crouching // cant sit if crouching
if (player.isSneaking()) return false; if (player.isSneaking()) return false;
// if sitting on a stair and sit while seated off, false // if sitting on a sit entity and sit while seated off, false
if (FileData.getSitEntity(player) != null && !FileData.getServerConfig().isSitWhileSeated()) return false; if (!FileData.getServerConfig().canSitWhileSeated() && FileData.getSitEntity(player) != null) 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 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 (hitResult != null) {