mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 0514fc4e2 Add missing effects 8f5d9effd Add getMainThreadExecutor to BukkitScheduler 313b5020b Allow adding items to BlockDropItemEvent (#5093) 9a556d9da [CI-SKIP] [Auto] Rebuild Patches 72b2768ad Inline shift fields in EnumDirection (#5082) ffff53fa7 added option to disable pathfinding updates on block changes (#5123) b67081fd7 add DragonEggFormEvent (fixes #5110) (#5112) 3eefafbaf Fix javadoc build 0081ed1c4 Add javadoc step to GH Actions 01082503e Add dropLeash variable to EntityUnleashEvent (#5130) 31f9f869a [CI-SKIP] Fix YourKit links in readme, fixes #5091 8ac27aa38 [Auto] Updated Upstream (CraftBukkit) c4d9cc831 [Auto] Updated Upstream (Bukkit/CraftBukkit) d0477d326 [Auto] Updated Upstream (CraftBukkit) d9f5f7018 EntityMoveEvent (#4614)
38 lines
2.0 KiB
Diff
38 lines
2.0 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] EMC - Configurable disable give dropping
|
|
|
|
Modified version of a patch by Aikar from EMC. Adds a config option in
|
|
purpur.yml to disable the /give command from dropping items on the
|
|
floor when a player's inventory is full.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/CommandGive.java b/src/main/java/net/minecraft/server/CommandGive.java
|
|
index 1d22c45af884a917e77e02c272fcbae74794200c..7bf90f27fdc48440ef229cca0e100d2c5c0ebef7 100644
|
|
--- a/src/main/java/net/minecraft/server/CommandGive.java
|
|
+++ b/src/main/java/net/minecraft/server/CommandGive.java
|
|
@@ -35,6 +35,7 @@ public class CommandGive {
|
|
boolean flag = entityplayer.inventory.pickup(itemstack);
|
|
EntityItem entityitem;
|
|
|
|
+ if (net.pl3x.purpur.PurpurConfig.disableGiveCommandDrops) continue; // Purpur - add config option for toggling give command dropping
|
|
if (flag && itemstack.isEmpty()) {
|
|
itemstack.setCount(1);
|
|
entityitem = entityplayer.drop(itemstack, false);
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
index e928716d7a2dcb390507b746763e6f7eaae241b5..7aee1687571010da55e8bb776ec1c658748e979a 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -191,6 +191,11 @@ public class PurpurConfig {
|
|
private static void useAlternateKeepAlive() {
|
|
useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
|
|
}
|
|
+
|
|
+ public static boolean disableGiveCommandDrops = false;
|
|
+ private static void disableGiveCommandDrops() {
|
|
+ disableGiveCommandDrops = getBoolean("settings.disable-give-dropping", disableGiveCommandDrops);
|
|
+ }
|
|
|
|
public static boolean barrelSixRows = false;
|
|
public static boolean enderChestSixRows = false;
|