forked from virt-mirrors/Sit
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;
|
return keepActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSitWhileSeated() {
|
public boolean canSitWhileSeated() {
|
||||||
return sitWhileSeated;
|
return sitWhileSeated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue