mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-27 09:42:37 +01:00
Implement sittrait
This commit is contained in:
parent
4768a4f76a
commit
6a15bc2d5a
@ -35,7 +35,7 @@ public class SitTrait extends Trait {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (!npc.isSpawned()) {
|
||||
if (!npc.isSpawned() || !sitting) {
|
||||
return;
|
||||
}
|
||||
if (holder == null) {
|
||||
@ -54,5 +54,8 @@ public class SitTrait extends Trait {
|
||||
|
||||
public void setSitting(boolean val) {
|
||||
this.sitting = val;
|
||||
if (!sitting) {
|
||||
onDespawn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user