mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
21 lines
1.2 KiB
Diff
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 ee7d29d85c8b024c9b23cba8ecd4192aa7e8aa7b..e50d8c5f6c4f2aa672732d1d42c4995c9b377530 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
|