2019-12-16 02:58:10 +00:00
|
|
|
From 164c698f430156235f83a2dd6b4f0d41a5e3c5a4 Mon Sep 17 00:00:00 2001
|
2019-05-06 19:30:27 +00:00
|
|
|
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
|
2019-12-16 02:58:10 +00:00
|
|
|
index 3f552b5905..cb756b1ba0 100644
|
2019-05-06 19:30:27 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
|
|
|
@@ -8,6 +8,11 @@ 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;
|
|
|
|
|
|
|
|
@@ -56,6 +61,28 @@ 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
|
|
|
|
--
|
2019-12-12 16:20:43 +00:00
|
|
|
2.24.1
|
2019-05-06 19:30:27 +00:00
|
|
|
|