2e99e5e677
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: af88996a SPIGOT-6890: Add repair cost amount in AnvilInventory bc7bd363 PR-716: Fix scheduler javadocs (previously, the <b> tag broke the rendering) 6db1ab70 Improve item cooldown JavaDocs CraftBukkit Changes: 13670b44 SPIGOT-6890: Add repair cost amount in AnvilInventory 0d109e86 PR-999: Prevent non-item cooldowns
47 Zeilen
2.4 KiB
Diff
47 Zeilen
2.4 KiB
Diff
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
|
|
index 9d513b3a1a50e67284ee7ebdc5607e4f44bd0a4b..bfa2345642142ea45460552fce97d5b411a5e48e 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
|
@@ -118,15 +118,15 @@ public class CraftSign extends CraftBlockEntityState<SignBlockEntity> implements
|
|
}
|
|
}
|
|
|
|
- public static void openSign(Sign sign, Player player) {
|
|
+ public static void openSign(Sign sign, org.bukkit.entity.HumanEntity player) { // Paper - change move open sign to HumanEntity
|
|
Preconditions.checkArgument(sign != null, "sign == null");
|
|
- Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed");
|
|
+ // Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed"); // Paper - don't require placed
|
|
Preconditions.checkArgument(sign.getWorld() == player.getWorld(), "Sign must be in same world as Player");
|
|
|
|
SignBlockEntity handle = ((CraftSign) sign).getTileEntity();
|
|
handle.isEditable = true;
|
|
|
|
- ((CraftPlayer) player).getHandle().openTextEdit(handle);
|
|
+ ((org.bukkit.craftbukkit.entity.CraftHumanEntity) player).getHandle().openTextEdit(handle); // Paper - change move open sign to HumanEntity
|
|
}
|
|
|
|
// Paper start
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
|
index 8b6452f21e7bbd90ce8311513f1dae0f936b6c3d..c0ed3dd9ebcaf710d202ae8b38007e6a1f20b57e 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
|
@@ -613,6 +613,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
|
}
|
|
}
|
|
|
|
+ // Paper start - move open sign method to HumanEntity
|
|
+ @Override
|
|
+ public void openSign(org.bukkit.block.Sign sign) {
|
|
+ org.bukkit.craftbukkit.block.CraftSign.openSign(sign, this);
|
|
+ }
|
|
+ // Paper end
|
|
@Override
|
|
public boolean dropItem(boolean dropAll) {
|
|
if (!(this.getHandle() instanceof ServerPlayer)) return false;
|