2014-03-26 21:34:47 +01:00
|
|
|
From 31f63511094b848c05597c101ca419edfaf88c88 Mon Sep 17 00:00:00 2001
|
2014-02-12 08:18:07 +01:00
|
|
|
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
|
2014-03-26 21:34:47 +01:00
|
|
|
index 92f95d7..eb5b84e 100644
|
2014-02-12 08:18:07 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2014-02-24 08:04:12 +01:00
|
|
|
@@ -1501,7 +1501,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
2014-03-23 01:06:43 +01:00
|
|
|
ItemStack itemstack = packetplayinsetcreativeslot.getItemStack();
|
2014-02-12 08:18:07 +01:00
|
|
|
boolean flag1 = packetplayinsetcreativeslot.c() >= 1 && packetplayinsetcreativeslot.c() < 36 + PlayerInventory.getHotbarSize();
|
|
|
|
// CraftBukkit - Add invalidItems check
|
|
|
|
- boolean flag2 = itemstack == null || itemstack.getItem() != null && !invalidItems.contains(Item.b(itemstack.getItem()));
|
|
|
|
+ boolean flag2 = itemstack == null || itemstack.getItem() != null && (!invalidItems.contains(Item.b(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
|
2014-02-12 14:48:26 +01:00
|
|
|
index 7cba69f..7589246 100644
|
2014-02-12 08:18:07 +01:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
2014-02-12 14:48:26 +01:00
|
|
|
@@ -267,4 +267,10 @@ public class SpigotConfig
|
2014-02-12 08:18:07 +01:00
|
|
|
{
|
|
|
|
silentCommandBlocks = getBoolean( "commands.silent-commandblock-console", false );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public static boolean filterCreativeItems;
|
|
|
|
+ private static void filterCreativeItems()
|
|
|
|
+ {
|
|
|
|
+ filterCreativeItems = getBoolean( "settings.filter-creative-items", true );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2014-03-23 01:06:43 +01:00
|
|
|
1.8.5.2.msysgit.0
|
2014-02-12 08:18:07 +01:00
|
|
|
|