Catching event for Hologram onTouch

Discussion in 'Plugin Development' started by Icculus, Mar 13, 2015.

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


    Hey folks,

    I first tried HoloAPI (both the latest release and latest dev versions) and ran into problems, the same error that I saw reported on their plugin page:

    [HoloAPI] No such field: t!

    So now I am trying the Holographic Displays API but I cannot seem to get the onTouch() event to fire.

    I created the hologram in the onJoin() eventhandler as follows:

    Location where = player.getLocation();
    Hologram hologram = HologramsAPI.createHologram(plugin, where);
    hologram.appendTextLine(ChatColor.WHITE + "Test: Click the Text");

    And have the onTouch even setup as:

    public void onTouch(Player player){"[CC] Player touched hologram " + player.getName());

    The hologram appears but can't get onTouch to fire.

    Any and all suggestions would be very helpful and appreciated! :)

  2. Offline


    @Icculus I have never used HoloAPI, but considering the "No such field" message, I'd say the version you're using it's not compatible with your craftbukkit build.
  3. Offline


    Thanks Konato, but I had already given up on HoloAPI before posting, the example that I posted was using Holographic Displays API. I am looking for info regarding its onTouch() event not firing...

  4. Offline


    I am pretty sure you need ProtocolLib installed for the "touch" features? I may be incorrect but I think you do.
Thread Status:
Not open for further replies.

Share This Page