Check the block that the item frame will end in, not the block the player clicked.

This commit is contained in:
Wizjany 2013-01-21 04:08:17 -05:00
parent d1e221c2b7
commit d214a859c3

View File

@ -169,7 +169,7 @@ public void onHangingPlace(HangingPlaceEvent event) {
}
if (wcfg.useRegions) {
if (!plugin.getGlobalRegionManager().canBuild(player, placedOn.getLocation())) {
if (!plugin.getGlobalRegionManager().canBuild(player, placedOn.getRelative(event.getBlockFace()))) {
player.sendMessage(ChatColor.DARK_RED + "You don't have permission for this area.");
event.setCancelled(true);
return;