Discussion in 'Plugin Development' started by dilo, Mar 18, 2012.

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


    ok i have taken over a plugin i got it updated for 1.1 but now you changed the api and now any line with direction does not work so something like "(this.direction" would be underlined. also "(Block b : blocks)" gets underlined am i missing something or what i would love to have a partner to check my work and help me with some of the coding you can pm me here contact me on skype username: dillo011 or on my website at thanks in advance. also i will get this up on gethub or similar asap

    oh source is here

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 24, 2016
  2. Here are some errors in the source:
    @Eventhandler should be @EventHandler (or even better "@EventHandler(priority=EventPriority.MONITOR)" because the plugin uses the prio monitor)
    Your still using old code in the onEnable.
    Replace your event registration with:
    this.getServer().getPluginManager().registerEvents(new SecretDoorsPlayerListener(this), this);
    this.getServer().getPluginManager().registerEvents(new SecretDoorsBlockListener(this), this);
    This is still the old event type. So change your class to:
    public class SecretDoorsPlayerListener implements Listener

    Replace the @Override with @EventHandler

    Also change the line with direction in it. Your referencing it wrong. So change them to
    door = new SecretDoor(clicked, behind, SecretDoor.Direction.DOOR_FIRST);
    door = new SecretDoor(behind, clicked, SecretDoor.Direction.BLOCK_FIRST);
    Thats hopefully it :) I won't get any errors on your b: block line. Maybe it's fixed with above changes :)
    Good luck!
Thread Status:
Not open for further replies.

Share This Page