geforkt von Mirrors/Paper
ea855e2b46
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 Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this Also, restore a patch that was dropped in the last upstream Bukkit Changes: 279eeab3 Fix command description not being set 96e2bb18 Remove debug print from SyntheticEventTest CraftBukkit Changes:d3ed1516
Fix dangerously threaded beacons217a293d
Don't relocate joptsimple to allow --help to work.1be05a21
Prepare for imminent Java 12 releasea49270b2
Mappings Update5259d80c
SPIGOT-4669: Fix PlayerTeleportEvent coordinates for relative teleports Spigot Changes: e6eb36f2 Rebuild patches
83 Zeilen
2.6 KiB
Diff
83 Zeilen
2.6 KiB
Diff
From bacfdeb718a1a43b35ea4cefdd5c1ca4bd00b434 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/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
|
index 6752d0b8c..03fee65e4 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
|
@@ -411,20 +411,22 @@ public class EntityItem extends Entity {
|
|
this.getDataWatcher().markDirty(EntityItem.b); // CraftBukkit - SPIGOT-4591, must mark dirty
|
|
}
|
|
|
|
- @Nullable
|
|
- public UUID k() {
|
|
+ @Nullable public UUID getOwner() { return k(); } // Paper - OBFHELPER
|
|
+ @Nullable public UUID k() { // Paper
|
|
return this.g;
|
|
}
|
|
|
|
+ public void setOwner(@Nullable UUID owner) { b(owner); } // Paper - OBFHELPER
|
|
public void b(@Nullable UUID uuid) {
|
|
this.g = uuid;
|
|
}
|
|
|
|
- @Nullable
|
|
- public UUID l() {
|
|
+ @Nullable public UUID getThrower() { return l(); } // Paper - OBFHELPER
|
|
+ @Nullable public UUID l() { // Paper
|
|
return this.f;
|
|
}
|
|
|
|
+ public void setThrower(@Nullable UUID thrower) { c(thrower); } // Paper - OBFHELPER
|
|
public void c(@Nullable UUID uuid) {
|
|
this.f = uuid;
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
|
index 6036592f7..4128ba4c0 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
|
@@ -9,6 +9,11 @@ import org.bukkit.inventory.ItemStack;
|
|
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
|
import org.bukkit.craftbukkit.CraftServer;
|
|
|
|
+// Paper start
|
|
+import javax.annotation.Nullable;
|
|
+import java.util.UUID;
|
|
+// Paper end
|
|
+
|
|
public class CraftItem extends CraftEntity implements Item {
|
|
private final EntityItem item;
|
|
|
|
@@ -53,6 +58,24 @@ public class CraftItem extends CraftEntity implements Item {
|
|
public void setCanMobPickup(boolean canMobPickup) {
|
|
item.canMobPickup = canMobPickup;
|
|
}
|
|
+
|
|
+ @Nullable
|
|
+ public UUID getOwner() {
|
|
+ return item.getOwner();
|
|
+ }
|
|
+
|
|
+ public void setOwner(@Nullable UUID owner) {
|
|
+ item.setOwner(owner);
|
|
+ }
|
|
+
|
|
+ @Nullable
|
|
+ public UUID getThrower() {
|
|
+ return item.getThrower();
|
|
+ }
|
|
+
|
|
+ public void setThrower(@Nullable UUID thrower) {
|
|
+ item.setThrower(thrower);
|
|
+ }
|
|
// Paper End
|
|
|
|
@Override
|
|
--
|
|
2.21.0
|
|
|