Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 02:50:09 +01:00
56 Zeilen
2.2 KiB
Diff
56 Zeilen
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
|
Date: Sun, 1 Apr 2018 02:28:43 +0300
|
|
Subject: [PATCH] Add openSign method to HumanEntity
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
|
index 08cef0d9fc27d0c09472cfe7091330d95956d9eb..00b803cee96fef8830e5db8722c98ff14630fd2a 100644
|
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
|
@@ -538,6 +538,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
|
*/
|
|
@Deprecated
|
|
public void setShoulderEntityRight(@Nullable Entity entity);
|
|
+ // Paper start - Add method to open already placed sign
|
|
+ /**
|
|
+ * Opens an editor window for the specified sign
|
|
+ *
|
|
+ * @param sign The sign to open
|
|
+ * @deprecated use {@link #openSign(org.bukkit.block.Sign, org.bukkit.block.sign.Side)}
|
|
+ */
|
|
+ @Deprecated
|
|
+ default void openSign(@NotNull org.bukkit.block.Sign sign) {
|
|
+ this.openSign(sign, org.bukkit.block.sign.Side.FRONT);
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * Opens an editor window for the specified sign
|
|
+ *
|
|
+ * @param sign The sign to open
|
|
+ * @param side The side of the sign to open
|
|
+ */
|
|
+ void openSign(org.bukkit.block.@NotNull Sign sign, org.bukkit.block.sign.@NotNull Side side);
|
|
+ // Paper end
|
|
|
|
/**
|
|
* Make the entity drop the item in their hand.
|
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
|
index 9f16ea635a27563a8568d10365f1b284cc93b15a..e1516a8e88aab4bb43a77b773d6682070e8a9b8a 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -3090,10 +3090,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|
/**
|
|
* Open a Sign for editing by the Player.
|
|
*
|
|
- * The Sign must be placed in the same world as the player.
|
|
+ * The Sign must be in the same world as the player.
|
|
*
|
|
* @param sign The sign to edit
|
|
+ * @deprecated use {@link #openSign(Sign, Side)}
|
|
*/
|
|
+ @Deprecated
|
|
public void openSign(@NotNull Sign sign);
|
|
|
|
/**
|