Help with my frist plugin

Discussion in 'Bukkit Help' started by deregudegu, Jan 30, 2012.

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

    deregudegu

    Hello,

    I'm brazilian and I'm studying Java and Bukkit API for develop plugins. I started with editing a plugin called EnderPearlDisable for up date it.
    But the Bukkit API changed the events system and I'm lost :(
    Could anyone help me?

    This is the code:

    Code:
    public void onEnable() {
            SimplePluginManager.registerEvent(Event.Type.PLAYER_INTERACT_ENTITY,
                    new Listener() {
     
                        public void onPlayerInteract(PlayerInteractEvent event) {
                            if (event.getItem() != null && event.getItem().getType() == Material.ENDER_PEARL) {
                                event.getPlayer().sendMessage(ChatColor.RED+"Ender Pearl não funciona.");
                                event.setCancelled(true);
                            }
                        }
                    },
                    EventPriority.NORMAL, this);
           
            System.out.println("Ender Pearl TP blocking enabled.");
           
        }
    The Eclipse say the method of 'SimplePluginManager.registerEvent' is wrong.

    Other questions:

    • How I use a event type like 'Event.Type.PLAYER_INTERACT_ENTITY' in Bukkit API 1.1 R3?
    • Could anyone inform a tutorial about create config files

    Thanks for read :D
     
  2. Offline

    Pezmantbh

    You should seek help in the plugin development forum :)
     
  3. Offline

    deregudegu

    What is the link?

    #Edit

    Thanks :D I found ;)
     
  4. Offline

    theguynextdoor

    Check my signature for config tutorial
     
  5. Offline

    deregudegu

Thread Status:
Not open for further replies.

Share This Page