2021-12-05 08:11:59 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
|
|
|
Date: Sun, 1 Apr 2018 02:29:37 +0300
|
|
|
|
Subject: [PATCH] Add openSign method to HumanEntity
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
2023-08-06 02:21:59 +02:00
|
|
|
index a19504cf5c98b4d8070dc1ffe322b84e1896d84a..f1ba0fd5d17fb1a26cf09848d4125ecfab39eddb 100644
|
2021-12-05 08:11:59 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
2023-08-06 02:21:59 +02:00
|
|
|
@@ -134,6 +134,7 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
|
|
|
|
return;
|
|
|
|
}
|
2021-12-05 08:11:59 +01:00
|
|
|
|
2023-06-09 04:45:48 +02:00
|
|
|
+ handle.setAllowedPlayerEditor(player.getUniqueId()); // Paper
|
2023-08-06 02:21:59 +02:00
|
|
|
((CraftPlayer) player).getHandle().openTextEdit(handle, Side.FRONT == side);
|
2021-12-05 08:11:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
2023-08-06 02:21:59 +02:00
|
|
|
index 2f5704b19148f390402c0823030806ba96860286..74f1af3dccddf52965e5c91277be3592649e8cfa 100644
|
2021-12-05 08:11:59 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
2023-06-13 01:51:45 +02:00
|
|
|
@@ -626,6 +626,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
2021-12-05 08:11:59 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+ // Paper start - move open sign method to HumanEntity
|
|
|
|
+ @Override
|
2023-06-08 21:35:20 +02:00
|
|
|
+ public void openSign(final org.bukkit.block.Sign sign, final org.bukkit.block.sign.Side side) {
|
2023-08-06 02:21:59 +02:00
|
|
|
+ org.bukkit.craftbukkit.block.CraftSign.openSign(sign, (CraftPlayer) this, side);
|
2021-12-05 08:11:59 +01:00
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
@Override
|
|
|
|
public boolean dropItem(boolean dropAll) {
|
|
|
|
if (!(this.getHandle() instanceof ServerPlayer)) return false;
|