mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
I'll make some changes now, so skipping build Changelog: * add CarpetFixes optimizations * fix optimizations config * lithium optimizations * add Carpet Fixes Sheep Optimization * add Async Pathfinding; add C2ME opts math * add 2 vmp patches * New performance patches; update README and wiki README * update configuration on wiki * update wiki main page * Updated Upstream (Purpur) * fix conflicts * make "Don't save Fireworks" patch configurable * Disable memory reserve allocating * Fix MC-172801 * resolve conflicts * add bstats to readme * dd custom list of forks * update logo link
26 lines
1.4 KiB
Diff
26 lines
1.4 KiB
Diff
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 599172b994d75484f7c7e0ce6d3d3d771c1c44d0..3a92072ded969bbdfd0c57b665770b5ada47ab39 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
|