Paper/CraftBukkit-Patches/0115-Check-Skull-canPlace.patch
2015-03-08 05:03:38 -05:00

27 lines
991 B
Diff

From 7c21aaa490e61d1a7d9767ed034580d02fc623ab Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
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 e710073..519574b 100644
--- a/src/main/java/net/minecraft/server/ItemSkull.java
+++ b/src/main/java/net/minecraft/server/ItemSkull.java
@@ -35,6 +35,12 @@ public class ItemSkull extends Item {
return false;
} else {
if (!world.isClientSide) {
+ // Spigot Start
+ if ( !Blocks.SKULL.canPlace( world, blockposition ) )
+ {
+ return false;
+ }
+ // Spigot End
world.setTypeAndData(blockposition, Blocks.SKULL.getBlockData().set(BlockSkull.FACING, enumdirection), 3);
int i = 0;
--
2.1.0