From f2d99a6bf3f28bd69b77ca04e42bbf5244d86b1e Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 15 Apr 2014 10:48:55 +1000 Subject: [PATCH] Check Skull canPlace - ensures skulls are only placed where they are supposed to. --- .../0139-Check-Skull-canPlace.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 CraftBukkit-Patches/0139-Check-Skull-canPlace.patch diff --git a/CraftBukkit-Patches/0139-Check-Skull-canPlace.patch b/CraftBukkit-Patches/0139-Check-Skull-canPlace.patch new file mode 100644 index 000000000..8400c3c4d --- /dev/null +++ b/CraftBukkit-Patches/0139-Check-Skull-canPlace.patch @@ -0,0 +1,26 @@ +From 0cd2a0d0956c136725d42c565bc7d99d35387ea9 Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Tue, 15 Apr 2014 10:48:35 +1000 +Subject: [PATCH] Check Skull canPlace + + +diff --git a/src/main/java/net/minecraft/server/ItemSkull.java b/src/main/java/net/minecraft/server/ItemSkull.java +index dd7e5cc..49346a6 100644 +--- a/src/main/java/net/minecraft/server/ItemSkull.java ++++ b/src/main/java/net/minecraft/server/ItemSkull.java +@@ -45,6 +45,12 @@ public class ItemSkull extends Item { + if (!world.isStatic) { + // CraftBukkit start - Handle in ItemBlock + // world.setTypeAndData(i, j, k, Blocks.SKULL, l, 2); ++ // Spigot Start ++ if ( !Blocks.SKULL.canPlace( world, i, j, k ) ) ++ { ++ return false; ++ } ++ // Spigot End + if (!ItemBlock.processBlockPlace(world, entityhuman, null, i, j, k, Blocks.SKULL, l, clickedX, clickedY, clickedZ)) { + return false; + } +-- +1.8.3.2 +