Action non physicals

This commit is contained in:
SvenjaReißaus 2019-03-18 21:29:11 -05:00
parent 8834371931
commit 99f4815fa8
No known key found for this signature in database
GPG Key ID: E5494A03FA36D54B

View File

@ -861,7 +861,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 is physical"); SavageFactions.plugin.log("Checking if the action is physical");
if (event.getAction() != Action.PHYSICAL) return; if (event.getAction() == Action.PHYSICAL) return;
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");