mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
add pufferfish back to purpur
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
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/commands/GiveCommand.java b/src/main/java/net/minecraft/server/commands/GiveCommand.java
|
||||
index 06e3a868e922f1b7a586d0ca28f64a67ae463b68..32beb045f990d4da6112da4fea295333cb69e2ea 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 (org.purpurmc.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, false, false); // SPIGOT-2942: Add boolean to call event
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index e80a13cd7178e056e5fdf770de7f5c03342dc52d..c55504d376f331b01d53aad6a9492ce2f8a4bbd3 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -202,6 +202,11 @@ public class PurpurConfig {
|
||||
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 int barrelRows = 3;
|
||||
public static boolean enderChestSixRows = false;
|
||||
public static boolean enderChestPermissionRows = false;
|
||||
Reference in New Issue
Block a user