More Sign Block API

Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
This commit is contained in:
Jake Potrebic
2023-06-23 12:16:28 -07:00
parent bfd4276e56
commit 5b97ae9832
2 changed files with 44 additions and 11 deletions

View File

@@ -198,6 +198,26 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
}
// Paper end
// Paper start - More Sign Block API
@Override
public java.util.UUID getAllowedEditorUniqueId() {
this.ensureNoWorldGeneration();
return this.getTileEntity().getPlayerWhoMayEdit();
}
@Override
public void setAllowedEditorUniqueId(java.util.UUID uuid) {
this.ensureNoWorldGeneration();
this.getTileEntity().setAllowedPlayerEditor(uuid);
}
@Override
public Side getInteractableSideFor(final double x, final double z) {
this.requirePlaced();
return this.getSnapshot().isFacingFrontText(x, z) ? Side.FRONT : Side.BACK;
}
// Paper end - More Sign Block API
public static Component[] sanitizeLines(String[] lines) {
Component[] components = new Component[4];