mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
Add API for waxed signs (#9291)
This commit is contained in:
parent
8405a53d88
commit
fd6fd80508
2 changed files with 77 additions and 0 deletions
48
patches/api/Add-API-for-waxed-signs.patch
Normal file
48
patches/api/Add-API-for-waxed-signs.patch
Normal file
|
@ -0,0 +1,48 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Thu, 8 Jun 2023 23:22:31 -0700
|
||||
Subject: [PATCH] Add API for waxed signs
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/Sign.java b/src/main/java/org/bukkit/block/Sign.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/block/Sign.java
|
||||
+++ b/src/main/java/org/bukkit/block/Sign.java
|
||||
@@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable {
|
||||
* outside of this event is undefined.
|
||||
*
|
||||
* @return if this sign is currently editable
|
||||
+ * @deprecated use {@link #isWaxed()}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public boolean isEditable();
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable {
|
||||
* outside of this event is undefined.
|
||||
*
|
||||
* @param editable if this sign is currently editable
|
||||
+ * @deprecated use {@link #setWaxed(boolean)}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public void setEditable(boolean editable);
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Gets whether the sign has been waxed and therefore prevents editing.
|
||||
+ *
|
||||
+ * @return true if waxed
|
||||
+ */
|
||||
+ boolean isWaxed();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets whether the sign is waxed.
|
||||
+ *
|
||||
+ * @param waxed true to wax and therefore prevent editing
|
||||
+ */
|
||||
+ void setWaxed(boolean waxed);
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Gets whether this sign has glowing text. Only affects the {@link Side#FRONT}.
|
||||
*
|
29
patches/server/Add-API-for-waxed-signs.patch
Normal file
29
patches/server/Add-API-for-waxed-signs.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Thu, 8 Jun 2023 23:22:36 -0700
|
||||
Subject: [PATCH] Add API for waxed signs
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
||||
@@ -0,0 +0,0 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
|
||||
getSnapshot().setWaxed(!editable);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public boolean isWaxed() {
|
||||
+ return this.getSnapshot().isWaxed();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setWaxed(final boolean waxed) {
|
||||
+ this.getSnapshot().setWaxed(waxed);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public boolean isGlowingText() {
|
||||
return this.front.isGlowingText();
|
Loading…
Reference in a new issue