Skip to content

Commit

Permalink
fix(extensions/signs): make join signs waxed to prevent updating
Browse files Browse the repository at this point in the history
  • Loading branch information
Misat11 committed Jul 21, 2024
1 parent ea9a652 commit 510cd9e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ public void onEdit(@NotNull PlayerUpdateSignEvent event) {
if (isAllowedToEdit(player) && isFirstLineValid(event.line(0))) {
if (registerSign(new SignLocation(event.block().location()), event.line(1))) {
player.sendMessage(signCreatedMessage(player));
var signState = event.block().blockSnapshot();
if (signState instanceof SignBlockSnapshot) {
((SignBlockSnapshot) signState).waxed(true);
signState.updateBlock(true, false);
}
} else {
player.sendMessage(signCannotBeCreatedMessage(player));
event.cancelled(true);
Expand Down

0 comments on commit 510cd9e

Please sign in to comment.