From a3cf5aea1afc4b420d623ada6f4cab389cb777d5 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 14 Oct 2020 19:56:14 +1100 Subject: [PATCH] #758: Item - add getters/setters for owner/thrower By: Shane Bee --- .../bukkit/craftbukkit/entity/CraftItem.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java index cc593fbc99..d7da0cf2e7 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java @@ -1,5 +1,6 @@ package org.bukkit.craftbukkit.entity; +import java.util.UUID; import net.minecraft.server.Entity; import net.minecraft.server.EntityItem; import org.bukkit.craftbukkit.CraftServer; @@ -48,6 +49,26 @@ public class CraftItem extends CraftEntity implements Item { item.age = value; } + @Override + public void setOwner(UUID uuid) { + item.setOwner(uuid); + } + + @Override + public UUID getOwner() { + return item.getOwner(); + } + + @Override + public void setThrower(UUID uuid) { + item.setThrower(uuid); + } + + @Override + public UUID getThrower() { + return item.getThrower(); + } + @Override public String toString() { return "CraftItem";