[Solved] "registerEvents(BlockEvent.BlockBreakEvent," no longer working

Discussion in 'Plugin Development' started by dilo, Apr 19, 2012.

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


    ok on my plugin changing over to the new event system i get stuck.
        @EventHandler (priority = EventPriority.MONITOR)
        public void onEnable() {
            getServer().getPluginManager().registerEvents(BlockEvent.BlockBreakEvent, new SecretDoorsPlayerListener(null), this);
            System.out.println(this.getDescription().getFullName() + " by Dill01 enabled");
    at registerEvents(BlockEvent.BlockBreakEvent, i get "BlockBreakEvent cannot be resolved or is not a field" so how would i fix this?? thanks in advance
  2. Offline


    Remove that part. The registerEvents method accepts a Listener and a Plugin.
  3. Offline


    wow plugin is now error free. now to testing and trying to add permissions to it

    ok completely flunked testing it does not function is there any way to implement the old way though a new piece of code cause that used to work

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 25, 2016
  4. Offline


    You probably need to add the @EventHandler annotation to your event methods.
  5. Offline


    if any one could give me a hand i have uploaded it on to git hub at this link
  6. Offline


    check ur github...
  7. Offline


    dilo Currently on your GitHub you're missing all @EventHandler's for each event. They're required
  8. Offline


    thanks for the help everyone i have updated the event handlers and it works dillyg10 thanks for doing that for me on github. if you know anything about the permissions please contact me i am going to play with what i know of them and see if i can get it so work
Thread Status:
Not open for further replies.

Share This Page