Skip to content

Commit

Permalink
Implement sittrait
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jun 14, 2022
1 parent 4768a4f commit 6a15bc2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main/src/main/java/net/citizensnpcs/trait/SitTrait.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void onDespawn() {

@Override
public void run() {
if (!npc.isSpawned()) {
if (!npc.isSpawned() || !sitting) {
return;
}
if (holder == null) {
Expand All @@ -54,5 +54,8 @@ public void run() {

public void setSitting(boolean val) {
this.sitting = val;
if (!sitting) {
onDespawn();
}
}
}

0 comments on commit 6a15bc2

Please sign in to comment.