mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-09 04:02:10 +01:00
should fix item usage issue
This commit is contained in:
parent
76b4f62e79
commit
3cbc7ab18f
@ -651,7 +651,7 @@ public class AuthMePlayerListener implements Listener {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.NORMAL)
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
if (event.getPlayer() == null)
|
if (event.getPlayer() == null)
|
||||||
return;
|
return;
|
||||||
@ -675,8 +675,9 @@ public class AuthMePlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (event.getClickedBlock() != null && event.getClickedBlock().getType() != Material.AIR)
|
if (event.getClickedBlock() != null){
|
||||||
event.setUseInteractedBlock(org.bukkit.event.Event.Result.DENY);
|
event.setUseInteractedBlock(org.bukkit.event.Event.Result.DENY);
|
||||||
|
}
|
||||||
event.setUseItemInHand(org.bukkit.event.Event.Result.DENY);
|
event.setUseItemInHand(org.bukkit.event.Event.Result.DENY);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user