SPIGOT-7452: Player#openSign cannot edit
This commit is contained in:
parent
d91e5aa0b6
commit
46c7fc3b1b
@ -111,12 +111,13 @@ public class CraftSign<T extends TileEntitySign> extends CraftBlockEntityState<T
|
|||||||
Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed");
|
Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed");
|
||||||
Preconditions.checkArgument(sign.getWorld() == player.getWorld(), "Sign must be in same world as Player");
|
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)) {
|
if (!CraftEventFactory.callPlayerSignOpenEvent(player, sign, side, PlayerSignOpenEvent.Cause.PLUGIN)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TileEntitySign handle = ((CraftSign<?>) sign).getTileEntity();
|
||||||
|
handle.setAllowedPlayerEditor(player.getUniqueId());
|
||||||
|
|
||||||
((CraftPlayer) player).getHandle().openTextEdit(handle, Side.FRONT == side);
|
((CraftPlayer) player).getHandle().openTextEdit(handle, Side.FRONT == side);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user