Skip to content

Commit da0a57a

Browse files
fix: /plot grant add doesn't send success message reliably (#4683)
* fix: move success message to correct execution point in /plot grant add * fix: send `grants.added` message even if player is offline --------- Co-authored-by: Alexander Brandes <[email protected]>
1 parent 87859b0 commit da0a57a

File tree

1 file changed

+4
-0
lines changed
  • Core/src/main/java/com/plotsquared/core/command

1 file changed

+4
-0
lines changed

Core/src/main/java/com/plotsquared/core/command/Grant.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ public CompletableFuture<Boolean> execute(
101101
);
102102
} else {
103103
access.set(access.get().orElse(0) + 1);
104+
player.sendMessage(
105+
TranslatableCaption.of("grants.added"),
106+
TagResolver.resolver("grants", Tag.inserting(Component.text(access.get().orElse(0))))
107+
);
104108
}
105109
}
106110
} else {

0 commit comments

Comments
 (0)