mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 02:22:12 +01:00
SPIGOT-7452: Player#openSign cannot edit
By: Miles Holder <mwholder2005@gmail.com>
This commit is contained in:
parent
0379c2cfee
commit
ce7d1f4f83
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue