PlayerDeathEvent#getItemsToKeep

Exposes a mutable array on items a player should keep on death.

This allows a cleaner method to implement "Keep certain items on death"
than how plugins currently do it in that it never removes them in first
place, so its safe if the player logs out/server is shutdown before respawn.

Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
This commit is contained in:
Aikar
2019-03-28 00:58:05 -04:00
parent 05c82fcfe0
commit 4606cb8ce3
11 changed files with 208 additions and 40 deletions

View File

@@ -12,11 +12,11 @@ This allows the client to render multiple skull textures from the same user,
for when different skins were used when skull was made.
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 713977e3c..91a9f1bbb 100644
index ba021bc40..76e0f6417 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -0,0 +0,0 @@ public final class ItemStack {
private int e;
// Paper end
@Deprecated
private Item item;
- private NBTTagCompound tag;