mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
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
This commit is contained in:
parent
b14059a5a1
commit
478597ea05
@ -1,59 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
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
|
||||
}
|
@ -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
|
||||
+ /**
|
||||
|
@ -1,52 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
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
|
@ -51,5 +51,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper End
|
||||
+
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftItem";
|
||||
public void setOwner(UUID uuid) {
|
||||
item.setOwner(uuid);
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit b45a7eedcfcd975eaa8b75a4d719b220a8263796
|
||||
Subproject commit e461dcfe4231846ba4d50bb16bd51505516abdd7
|
@ -1 +1 @@
|
||||
Subproject commit 29dd68eb99bc890790a757d59d07e864dce98a4f
|
||||
Subproject commit 055870c4bca477067f9113deb1090228cccf67c6
|
Loading…
Reference in New Issue
Block a user