Skip to content

Commit

Permalink
Modified SignClickListener to only cancel left click events
Browse files Browse the repository at this point in the history
  • Loading branch information
alex9849 committed Jul 2, 2023
1 parent b6a8c95 commit 55bd3a0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ public void interactEvent(PlayerInteractEvent event) {
}

if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
event.setCancelled(true);
if (event.getPlayer().isSneaking()) {
this.handleSignCmd(region, AdvancedRegionMarket.getInstance().getPluginSettings().getSignRightClickSneakCommand(), event);
} else {
this.handleSignCmd(region, AdvancedRegionMarket.getInstance().getPluginSettings().getSignRightClickNotSneakCommand(), event);
}
} else if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
event.setCancelled(true);
if (event.getPlayer().isSneaking()) {
this.handleSignCmd(region, AdvancedRegionMarket.getInstance().getPluginSettings().getSignLeftClickSneakCommand(), event);
} else {
Expand Down

0 comments on commit 55bd3a0

Please sign in to comment.