Catching right clicks instead of lefts
This commit is contained in:
parent
35b5724da5
commit
2437e206b7
Binary file not shown.
@ -862,7 +862,7 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
// only need to check right-clicks and physical as of MC 1.4+; good performance boost
|
// only need to check right-clicks and physical as of MC 1.4+; good performance boost
|
||||||
SavageFactions.plugin.log("Checking if the action aren't left clicks");
|
SavageFactions.plugin.log("Checking if the action aren't left clicks");
|
||||||
if (!event.getAction().equals(Action.LEFT_CLICK_BLOCK) || !event.getAction().equals(Action.LEFT_CLICK_AIR)) return;
|
if (event.getAction().equals(Action.LEFT_CLICK_BLOCK) || event.getAction().equals(Action.LEFT_CLICK_AIR)) return;
|
||||||
SavageFactions.plugin.log("Attempting to allow food and potis");
|
SavageFactions.plugin.log("Attempting to allow food and potis");
|
||||||
if (event.getPlayer().getItemInHand() != null) {
|
if (event.getPlayer().getItemInHand() != null) {
|
||||||
Material handItem = event.getPlayer().getItemInHand().getType();
|
Material handItem = event.getPlayer().getItemInHand().getType();
|
||||||
|
Loading…
Reference in New Issue
Block a user