Files
Purpur/purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GiveCommand.java.patch

11 lines
666 B
Diff

--- a/net/minecraft/server/commands/GiveCommand.java
+++ b/net/minecraft/server/commands/GiveCommand.java
@@ -69,6 +_,7 @@
i1 -= min;
ItemStack itemStack1 = item.createItemStack(min, false);
boolean flag = serverPlayer.getInventory().add(itemStack1);
+ if (org.purpurmc.purpur.PurpurConfig.disableGiveCommandDrops) continue; // Purpur - add config option for toggling give command dropping
if (flag && itemStack1.isEmpty()) {
ItemEntity itemEntity = serverPlayer.drop(itemStack, false);
if (itemEntity != null) {