mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-04-20 02:08:15 +02:00
11 lines
755 B
Diff
11 lines
755 B
Diff
--- a/net/minecraft/server/commands/GiveCommand.java
|
|
+++ b/net/minecraft/server/commands/GiveCommand.java
|
|
@@ -61,6 +_,7 @@
|
|
remaining -= size;
|
|
ItemStack copyToDrop = prototypeItemStack.copyWithCount(size);
|
|
boolean added = player.getInventory().add(copyToDrop);
|
|
+ if (org.purpurmc.purpur.PurpurConfig.disableGiveCommandDrops) continue; // Purpur - add config option for toggling give command dropping
|
|
if (added && copyToDrop.isEmpty()) {
|
|
ItemEntity drop = player.drop(prototypeItemStack.copy(), false, false, false, null); // Paper - do not fire PlayerDropItemEvent for /give command
|
|
if (drop != null) {
|