mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-15 07:01:36 +08:00
1c49ff69f4
The hell happened here. : Fix Build 2339ac14a8e Regen the patches 89d3fcbdfaf This new system breaks a lot :(
38 lines
1.8 KiB
Diff
38 lines
1.8 KiB
Diff
From b0afa4907c4edd212821d34e57f4165875c95532 Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Wed, 12 Feb 2014 18:18:01 +1100
|
|
Subject: [PATCH] Allow Disabling Creative Item Filter
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
index 064b4c6..da185c1 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -1642,7 +1642,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
|
|
|
boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() < 36 + PlayerInventory.getHotbarSize();
|
|
// CraftBukkit - Add invalidItems check
|
|
- boolean flag2 = itemstack == null || itemstack.getItem() != null && !invalidItems.contains(Item.getId(itemstack.getItem()));
|
|
+ boolean flag2 = itemstack == null || itemstack.getItem() != null && (!invalidItems.contains(Item.getId(itemstack.getItem())) || !org.spigotmc.SpigotConfig.filterCreativeItems); // Spigot
|
|
boolean flag3 = itemstack == null || itemstack.getData() >= 0 && itemstack.count <= 64 && itemstack.count > 0;
|
|
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
index f58208e..86c45c6 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
@@ -295,4 +295,10 @@ public class SpigotConfig
|
|
{
|
|
silentCommandBlocks = getBoolean( "commands.silent-commandblock-console", false );
|
|
}
|
|
+
|
|
+ public static boolean filterCreativeItems;
|
|
+ private static void filterCreativeItems()
|
|
+ {
|
|
+ filterCreativeItems = getBoolean( "settings.filter-creative-items", true );
|
|
+ }
|
|
}
|
|
--
|
|
2.1.0
|
|
|