Disable Eye of Ender use

Discussion in 'Spigot Plugin Development' started by XeventoNetwork, Apr 5, 2014.

  1. Does someone knows how to disable the eye of ender use ?

    I tryed to disable it in the "PlayerInteractEvent", "ProjectileLaunchEvent" but i can still use it :(
  2. kinda like this...

    Code (Text):

    public void onPlayerInteract(PlayerInteractEvent e) {
    Player p = e.getPlayer();
    if (p.getItemInHand.getType() == Material.EnderEye) {
    Something like that. Just something I threw together off the top of my head :p
  3. Fuck ....
    i did it like that:
    @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
    public void onInteract(PlayerInteractEvent event) {

    i think "ignoreCancelled" was the problem
  4. Pretty sure you can just add it to Essentials blacklist under "use". Just enter the ID of the eye of ender and any other entity that involves throwing.
  5. Set the priority to lowest, because that makes it register your listener before anything else. Also have you made sure that your listener is registered in onEnable?
  6. Please mind your language.
  7. General Rules
    1) Keep the chat at a PG-13 level.

    The PG-13 movies get 1 f bomb xD
  8. Its just impolite. Using the F-Bomb is not appropriate for the younger readers. That is why I am asking politely for him not to use it.
    • Funny Funny x 1