Skip to content

Commit

Permalink
Fix: applyChanges only sent message when it succeeded
Browse files Browse the repository at this point in the history
  • Loading branch information
spnda committed Jun 12, 2021
1 parent 18f60bd commit bede93b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ protected void applyChanges(
LockReturnValue ret = changes.apply(handler);
if (ret.success) {
handler.applyToDoor(handler.block);
}
if (sendMessage) {
BaseComponent[] messageComponent = TextComponent.fromLegacyText(ret.message);
if (sendMessage) player.spigot().sendMessage(ChatMessageType.ACTION_BAR, messageComponent);
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, messageComponent);
}
if (exit) {
exit(player);
Expand Down

0 comments on commit bede93b

Please sign in to comment.