mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-18 08:36:13 +01:00
cab333b217
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66 Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
38 lines
1.9 KiB
Diff
38 lines
1.9 KiB
Diff
From bbf61acf65ddf03cee535f7b8c93ad4aaf2425e7 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 daa524f..a0157af 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -1499,7 +1499,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
|
ItemStack itemstack = packetplayinsetcreativeslot.getItemStack();
|
|
boolean flag1 = packetplayinsetcreativeslot.c() >= 1 && packetplayinsetcreativeslot.c() < 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;
|
|
|
|
// CraftBukkit start - Call click event
|
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
index 731f24d..05c2e43 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 );
|
|
+ }
|
|
}
|
|
--
|
|
1.9.1
|
|
|