Add Player#give (#11995)

This commit is contained in:
masmc05
2025-01-26 22:19:00 +02:00
committed by GitHub
parent fb5b173c6a
commit 3af5e77132
4 changed files with 131 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package io.papermc.paper.entity;
import java.util.Collection;
import java.util.Collections;
import org.bukkit.entity.Item;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.Unmodifiable;
import org.jspecify.annotations.NullMarked;
@NullMarked
public record PaperPlayerGiveResult(
@Unmodifiable Collection<ItemStack> leftovers,
@Unmodifiable Collection<Item> drops
) implements PlayerGiveResult {
public static final PlayerGiveResult EMPTY = new PaperPlayerGiveResult(
Collections.emptyList(), Collections.emptyList()
);
}