papermc/CraftBukkit-Patches/0131-Check-Skull-canPlace.patch

27 lines
1 KiB
Diff
Raw Normal View History

2014-04-18 23:15:23 +00:00
From dfe20c18163c5048564dd93153f1100fb98ac9ee 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 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;
}
--
2014-04-18 23:15:23 +00:00
1.9.1