SPIGOT-7452: Player#openSign cannot edit

By: Miles Holder <mwholder2005@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2023-08-10 19:02:56 +10:00
parent 0379c2cfee
commit ce7d1f4f83

View file

@ -111,12 +111,13 @@ public class CraftSign<T extends TileEntitySign> extends CraftBlockEntityState<T
Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed");
Preconditions.checkArgument(sign.getWorld() == player.getWorld(), "Sign must be in same world as Player");
TileEntitySign handle = ((CraftSign<?>) sign).getTileEntity();
if (!CraftEventFactory.callPlayerSignOpenEvent(player, sign, side, PlayerSignOpenEvent.Cause.PLUGIN)) {
return;
}
TileEntitySign handle = ((CraftSign<?>) sign).getTileEntity();
handle.setAllowedPlayerEditor(player.getUniqueId());
((CraftPlayer) player).getHandle().openTextEdit(handle, Side.FRONT == side);
}