mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-26 02:57:42 +01:00
Ignore sneaking when checking the events.
This commit is contained in:
parent
992e53856d
commit
b52a6bd6d6
@ -329,8 +329,6 @@ public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
case LEFT_CLICK_BLOCK:
|
||||
placed = clicked.getRelative(event.getBlockFace());
|
||||
|
||||
// As of MC ~1.6, sneaking blocks the use of blocks with right click
|
||||
if (!player.isSneaking() || event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
||||
// Only fire events for blocks that are modified when right clicked
|
||||
if (isBlockModifiedOnClick(clicked.getType()) || (item != null && isItemAppliedToBlock(item.getType(), clicked.getType()))) {
|
||||
if (Events.fireAndTestCancel(new UseBlockEvent(event, cause, clicked))) {
|
||||
@ -345,7 +343,6 @@ public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Special handling of putting out fires
|
||||
if (event.getAction() == Action.LEFT_CLICK_BLOCK && placed.getType() == Material.FIRE) {
|
||||
|
Loading…
Reference in New Issue
Block a user