Fix SignChangeEvent never actually being called (#5341)

Fixes #5340. Caused by a regression in #5304 which reverted the behaviour introduced in #5304.
This commit is contained in:
Josh Roy 2023-05-08 19:26:28 -04:00 committed by GitHub
parent dd3f4c2921
commit 1a4f63915f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.FormatUtil;
import com.earth2me.essentials.utils.NumberUtil;
import com.google.common.collect.Lists;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.block.Block;
@ -109,6 +110,7 @@ public class Commandeditsign extends EssentialsCommand {
private boolean callSignEvent(final Sign sign, final Player player, final String[] lines) {
final SignChangeEvent event = new SignChangeEvent(sign.getBlock(), player, lines);
Bukkit.getServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
if (ess.getSettings().isDebug()) {
ess.getLogger().info("SignChangeEvent canceled for /editsign execution by " + player.getName());