mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-23 08:49:18 +00:00
Some new patches
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sun, 11 Jun 2023 23:37:00 +0300
|
||||
Subject: [PATCH] Do not drop items from Give command
|
||||
|
||||
Original project: starlis/empirecraft
|
||||
Link: https://github.com/starlis/empirecraft/blob/master/patches/server/0050-Do-not-drop-items-from-Give-command.patch
|
||||
This is a permanent change. Some players who have /give perms may abuse this to create lags on server
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/commands/GiveCommand.java b/src/main/java/net/minecraft/server/commands/GiveCommand.java
|
||||
index 0ff3b06a98b2f4514b2d861b92dd70fe678ae86c..b5646fbfb94ba07b8d723ffcf21e7506bc097f3e 100644
|
||||
--- a/src/main/java/net/minecraft/server/commands/GiveCommand.java
|
||||
+++ b/src/main/java/net/minecraft/server/commands/GiveCommand.java
|
||||
@@ -57,6 +57,11 @@ public class GiveCommand {
|
||||
l -= i1;
|
||||
ItemStack itemstack1 = item.createItemStack(i1, false);
|
||||
boolean flag = entityplayer.getInventory().add(itemstack1);
|
||||
+ // DivineMC start - EMC - never drop items
|
||||
+ if (true) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
ItemEntity entityitem;
|
||||
|
||||
if (org.purpurmc.purpur.PurpurConfig.disableGiveCommandDrops) continue; // Purpur - add config option for toggling give command dropping
|
||||
Reference in New Issue
Block a user