aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0092-Add-openSign-method-to-HumanEntity.patch
blob: d519918aba6e6e22fe5ac888e0f217a3473f5adc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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 8cc6f8547380d567aef7910ef309193bd79ced09..48bb08cc7c0af6ebb905d1e175ada0fd7944ca48 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -496,6 +496,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 b427a37d1b382037e946e5a899e571c3aebe5ba9..d8f97d8626850ed833b2dd32fab682cdf61a9948 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3075,10 +3075,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);
 
     /**