From 478597ea05f1d1a2594e85b38c449df5642bb138 Mon Sep 17 00:00:00 2001 From: Mariell Hoversholm Date: Wed, 14 Oct 2020 16:00:43 +0200 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit) Upstream has released updates that appears 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: e461dcfe #555: Item - add getters/setters for owner/thrower CraftBukkit Changes: 055870c4 #758: Item - add getters/setters for owner/thrower --- ...support.patch => 0221-Brand-support.patch} | 0 ...s-and-setters-for-EntityItem-owner-a.patch | 59 ------------------- Spigot-API-Patches/Item-canEntityPickup.patch | 4 +- ...support.patch => 0550-Brand-support.patch} | 0 ...support.patch => 0560-Brand-support.patch} | 0 ...s-and-setters-for-EntityItem-owner-a.patch | 52 ---------------- .../Item-canEntityPickup.patch | 4 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 9 files changed, 6 insertions(+), 117 deletions(-) rename Spigot-API-Patches/{0222-Brand-support.patch => 0221-Brand-support.patch} (100%) delete mode 100644 Spigot-API-Patches/Implement-getters-and-setters-for-EntityItem-owner-a.patch rename Spigot-Server-Patches/{0551-Brand-support.patch => 0550-Brand-support.patch} (100%) rename Spigot-Server-Patches/{0561-Brand-support.patch => 0560-Brand-support.patch} (100%) delete mode 100644 Spigot-Server-Patches/Implement-getters-and-setters-for-EntityItem-owner-a.patch diff --git a/Spigot-API-Patches/0222-Brand-support.patch b/Spigot-API-Patches/0221-Brand-support.patch similarity index 100% rename from Spigot-API-Patches/0222-Brand-support.patch rename to Spigot-API-Patches/0221-Brand-support.patch diff --git a/Spigot-API-Patches/Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-API-Patches/Implement-getters-and-setters-for-EntityItem-owner-a.patch deleted file mode 100644 index 02d2f77fd6..0000000000 --- a/Spigot-API-Patches/Implement-getters-and-setters-for-EntityItem-owner-a.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: BillyGalbreath -Date: Sat, 6 Oct 2018 20:54:13 -0500 -Subject: [PATCH] Implement getters and setters for EntityItem owner and - thrower - - -diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/entity/Item.java -+++ b/src/main/java/org/bukkit/entity/Item.java -@@ -0,0 +0,0 @@ package org.bukkit.entity; - import org.bukkit.inventory.ItemStack; - import org.jetbrains.annotations.NotNull; - -+// Paper start -+import org.jetbrains.annotations.Nullable; -+import java.util.UUID; -+// Paper end -+ - /** - * Represents a dropped item. - */ -@@ -0,0 +0,0 @@ public interface Item extends Entity { - * @param canMobPickup True to allow non-player entity pickup - */ - public void setCanMobPickup(boolean canMobPickup); -+ -+ /** -+ * The owner of this item. Only the owner can pick up the item until it is within 10 seconds of despawning -+ * -+ * @return The owner's UUID -+ */ -+ @Nullable -+ public UUID getOwner(); -+ -+ /** -+ * Set the owner of this item. Only the owner can pick up the item until it is within 10 seconds of despawning -+ * -+ * @param owner The owner's UUID -+ */ -+ public void setOwner(@Nullable UUID owner); -+ -+ /** -+ * Get the thrower of this item. -+ * -+ * @return The thrower's UUID -+ */ -+ @Nullable -+ public UUID getThrower(); -+ -+ /** -+ * Set the thrower of this item. -+ * -+ * @param thrower The thrower's UUID -+ */ -+ public void setThrower(@Nullable UUID thrower); - // Paper end - } diff --git a/Spigot-API-Patches/Item-canEntityPickup.patch b/Spigot-API-Patches/Item-canEntityPickup.patch index af0122830c..ec8b71ae5d 100644 --- a/Spigot-API-Patches/Item-canEntityPickup.patch +++ b/Spigot-API-Patches/Item-canEntityPickup.patch @@ -9,9 +9,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/entity/Item.java +++ b/src/main/java/org/bukkit/entity/Item.java @@ -0,0 +0,0 @@ public interface Item extends Entity { - * @param delay New delay */ - public void setPickupDelay(int delay); + @Nullable + public UUID getThrower(); + + // Paper Start + /** diff --git a/Spigot-Server-Patches/0551-Brand-support.patch b/Spigot-Server-Patches/0550-Brand-support.patch similarity index 100% rename from Spigot-Server-Patches/0551-Brand-support.patch rename to Spigot-Server-Patches/0550-Brand-support.patch diff --git a/Spigot-Server-Patches/0561-Brand-support.patch b/Spigot-Server-Patches/0560-Brand-support.patch similarity index 100% rename from Spigot-Server-Patches/0561-Brand-support.patch rename to Spigot-Server-Patches/0560-Brand-support.patch diff --git a/Spigot-Server-Patches/Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-Server-Patches/Implement-getters-and-setters-for-EntityItem-owner-a.patch deleted file mode 100644 index c2a85da915..0000000000 --- a/Spigot-Server-Patches/Implement-getters-and-setters-for-EntityItem-owner-a.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: BillyGalbreath -Date: Sat, 6 Oct 2018 20:54:23 -0500 -Subject: [PATCH] Implement getters and setters for EntityItem owner and - thrower - - -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -@@ -0,0 +0,0 @@ import org.bukkit.entity.EntityType; - import org.bukkit.entity.Item; - import org.bukkit.inventory.ItemStack; - -+// Paper start -+import javax.annotation.Nullable; -+import java.util.UUID; -+// Paper end -+ - public class CraftItem extends CraftEntity implements Item { - private final EntityItem item; - -@@ -0,0 +0,0 @@ public class CraftItem extends CraftEntity implements Item { - public void setCanMobPickup(boolean canMobPickup) { - item.canMobPickup = canMobPickup; - } -+ -+ @Nullable -+ @Override -+ public UUID getOwner() { -+ return item.getOwner(); -+ } -+ -+ @Override -+ public void setOwner(@Nullable UUID owner) { -+ item.setOwner(owner); -+ } -+ -+ @Nullable -+ @Override -+ public UUID getThrower() { -+ return item.getThrower(); -+ } -+ -+ @Override -+ public void setThrower(@Nullable UUID thrower) { -+ item.setThrower(thrower); -+ } - // Paper End - - @Override diff --git a/Spigot-Server-Patches/Item-canEntityPickup.patch b/Spigot-Server-Patches/Item-canEntityPickup.patch index 9df7a8230c..2f343a1c39 100644 --- a/Spigot-Server-Patches/Item-canEntityPickup.patch +++ b/Spigot-Server-Patches/Item-canEntityPickup.patch @@ -51,5 +51,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper End + @Override - public String toString() { - return "CraftItem"; + public void setOwner(UUID uuid) { + item.setOwner(uuid); diff --git a/work/Bukkit b/work/Bukkit index b45a7eedcf..e461dcfe42 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit b45a7eedcfcd975eaa8b75a4d719b220a8263796 +Subproject commit e461dcfe4231846ba4d50bb16bd51505516abdd7 diff --git a/work/CraftBukkit b/work/CraftBukkit index 29dd68eb99..055870c4bc 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 29dd68eb99bc890790a757d59d07e864dce98a4f +Subproject commit 055870c4bca477067f9113deb1090228cccf67c6