Cant check if im right clicking a block?

Discussion in 'Plugin Development' started by PotatoLol12321, Dec 12, 2014.

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


    My code
    public void onEnable(){
            Bukkit.getPluginManager().registerEvents(this, this);
        public void onInteract(PlayerInteractEvent e) {
            if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
                double x = (e.getClickedBlock().getLocation().getX());
                double y = (e.getClickedBlock().getLocation().getY() + 5);
                double z = (e.getClickedBlock().getLocation().getZ());
                Location loc = new Location(e.getClickedBlock().getWorld(), x, y, z);
    Doesnt do anything, and no errors.

    nvm fixed

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 29, 2016
Thread Status:
Not open for further replies.

Share This Page