9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-20 07:19:23 +00:00
Files
DivineMC/patches/server/0024-Do-not-drop-items-from-Give-command.patch
2022-11-12 23:12:30 +03:00

21 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 14 Jan 2016 00:49:14 -0500
Subject: [PATCH] Do not drop items from Give command
Original code by Starlis, licensed under GNU General Public License v3.0
You can find the original code on https://github.com/starlis/empirecraft
diff --git a/src/main/java/net/minecraft/server/commands/GiveCommand.java b/src/main/java/net/minecraft/server/commands/GiveCommand.java
index 06e3a868e922f1b7a586d0ca28f64a67ae463b68..00c481ebf012efa5424e32521e7aecf4b36f24c0 100644
--- a/src/main/java/net/minecraft/server/commands/GiveCommand.java
+++ b/src/main/java/net/minecraft/server/commands/GiveCommand.java
@@ -58,6 +58,7 @@ public class GiveCommand {
boolean flag = entityplayer.getInventory().add(itemstack);
ItemEntity entityitem;
+ if (true) { continue; } // EMC - never drop items
if (flag && itemstack.isEmpty()) {
itemstack.setCount(1);
entityitem = entityplayer.drop(itemstack, false, false, false); // SPIGOT-2942: Add boolean to call event