mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-19 07:53:22 +02:00
isSitWhileSeated -> canSitWhileSeated + better sitWhileSeated logic
This commit is contained in:
parent
2e1ae46d77
commit
e2b1a5f414
2 changed files with 3 additions and 3 deletions
|
@ -69,7 +69,7 @@ public class ServerConfig {
|
|||
return keepActive;
|
||||
}
|
||||
|
||||
public boolean isSitWhileSeated() {
|
||||
public boolean canSitWhileSeated() {
|
||||
return sitWhileSeated;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ public class Logic {
|
|||
// cant sit if crouching
|
||||
if (player.isSneaking()) return false;
|
||||
|
||||
// if sitting on a stair and sit while seated off, false
|
||||
if (FileData.getSitEntity(player) != null && !FileData.getServerConfig().isSitWhileSeated()) return false;
|
||||
// if sitting on a sit entity and sit while seated off, 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 (hitResult != null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue