Skip to content

Commit d42347f

Browse files
authored
Fix sending message during /editsign paste if SignChangeEvent is cancelled (#6136)
1 parent e836747 commit d42347f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Essentials/src/main/java/com/earth2me/essentials/commands/Commandeditsign.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,17 @@ protected void run(final Server server, final User user, final String commandLab
100100
for (int i = 0; i < 4; i++) {
101101
existingLines[i] = FormatUtil.formatString(user, "essentials.editsign", user.getSignCopy().get(i));
102102
}
103+
if (callSignEvent(sign, user.getBase(), existingLines)) {
104+
return;
105+
}
103106
user.sendTl("editsignPaste", commandLabel);
104107
} else {
105108
existingLines[line] = FormatUtil.formatString(user, "essentials.editsign", user.getSignCopy().get(line));
109+
if (callSignEvent(sign, user.getBase(), existingLines)) {
110+
return;
111+
}
106112
user.sendTl("editsignPasteLine", line + 1, commandLabel);
107113
}
108-
109-
callSignEvent(sign, user.getBase(), existingLines);
110114
} else {
111115
throw new NotEnoughArgumentsException();
112116
}

0 commit comments

Comments
 (0)