Fix boat placement not being properly prevented.

Fixes WORLDGUARD-3174.
This commit is contained in:
sk89q 2014-08-31 19:36:39 -07:00
parent d6f12804ea
commit 2a3ccec429

View File

@ -827,6 +827,11 @@ private static <T extends Event & Cancellable> void handleBlockRightClick(T even
Events.fireToCancel(event, new SpawnEntityEvent(event, cause, placed.getLocation().add(0.5, 0, 0.5), EntityType.MINECART));
}
// Handle created boats
if (item != null && item.getType() == Material.BOAT) {
Events.fireToCancel(event, new SpawnEntityEvent(event, cause, placed.getLocation().add(0.5, 0, 0.5), EntityType.BOAT));
}
// Handle created spawn eggs
if (item != null && item.getType() == Material.MONSTER_EGG) {
MaterialData data = item.getData();