Interact issues

Discussion in 'Plugin Development' started by DanielBlupi, Dec 28, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    DanielBlupi

    @EventHandler
    public void onInteract(PlayerInteractEvent e) {
    if(e.getAction() == Action.RIGHT_CLICK_AIR) {
    if(e.getPlayer().getItemInHand().getType() == Material.DIAMOND_HOE) {
    e.getPlayer().launchProjectile(Snowball.class);

    When i right click with a diamond hoe nothing happens, can someone help?
     
  2. Offline

    timtower Administrator Administrator Moderator

    Moved to plugin developement
    @DanielBlupi Did you register the event in the onEnable?
     
Thread Status:
Not open for further replies.

Share This Page