SignChangeEvent not being called

Discussion in 'Plugin Development' started by techboy291, Dec 12, 2012.

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

    techboy291

    Hi,

    So everything in my plugin works fine, except my SignChangeEvent method. I can't figure out why it won't work. It's in the listener class and @EventHandler is above it, but for some reason it just isn't called.

    Ideas?
     
  2. Offline

    javoris767

    It would help to have a visual look at the code o-o
     
  3. Offline

    KeybordPiano459

    techboy291
    Also, have you registered the listener?
     
    Scizzr likes this.
  4. Offline

    techboy291

    Yes. All the other events in my listener class work fine.
     
  5. Offline

    KeybordPiano459

    Can you at least show us the code?
     
  6. Offline

    techboy291

    My class is pretty messy, so here's my onSignChange method:


    Code:
    @EventHandler
        public void onSignChange(SignChangeEvent event) {
            Player eventplayer = event.getPlayer();
            if(event.getLine(0).equalsIgnoreCase("[test-this]")) {
                event.setLine(1, "It works");
            }
        }
    And here's my onEnable method:
    Code:
    public void onEnable() {
            logger.info("techboy's test plugin is now enabled!");
            getServer().getPluginManager().registerEvents(this, this);
        }
     
  7. Offline

    Rprrr

    Use debug messages?
     
Thread Status:
Not open for further replies.

Share This Page