attempted to register an invalid EventHandler method signature

Discussion in 'Plugin Development' started by chriztopia, Nov 16, 2012.

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

    chriztopia

    I am having a problem with LWC events not being registered. I am just trying to test that it is actualy blocking the LWC register for now.

    My Listener
    Code:
        @EventHandler(priority = EventPriority.HIGHEST)
        public void onProtectionInteract(LWCProtectionInteractEvent event) {
        event.getEvent().getPlayer().sendMessage("BLOCK1");
        event.getProtection().remove();
        }
     
        @EventHandler
        public void onRegisterProtection(LWCProtectionRegisterEvent event) {
            event.getPlayer().sendMessage("Block2");
        //event.setCancelled(true);
        }    
    My Error Log
    Code:
    2012-11-16 08:55:48 [INFO] [BuyLand] Enabling BuyLand v0.5.1
    2012-11-16 08:55:48 [SEVERE] [BuyLand] BuyLand v0.5.1 attempted to register an invalid EventHandler method signature "public void me.buyland.buyland.ServerChatPlayerListener.onProtectionInteract(com.griefcraft.scripting.event.LWCProtectionInteractEvent)" in class me.buyland.buyland.ServerChatPlayerListener
    2012-11-16 08:55:48 [SEVERE] [BuyLand] BuyLand v0.5.1 attempted to register an invalid EventHandler method signature "public void me.buyland.buyland.ServerChatPlayerListener.onRegisterProtection(com.griefcraft.scripting.event.LWCProtectionRegisterEvent)" in class me.buyland.buyland.ServerChatPlayerListener
    2012-11-16 08:55:48 [INFO] BuyLand version 0.5.1 is enabled!
     
  2. Offline

    chaseoes

    Have you added LWC as a dependency?
     
  3. Offline

    chriztopia

    Code:
    depend: [WorldGuard]
    softdepend: [Vault, LWC]
    yes everything else works but when I started to work on adding in LWC it wont work.
     
  4. add lwc as a depend instead of soft depend, yur code is coing to crash your plugin is lwc is not found
     
  5. Offline

    desht

    A quick look at the LWC source code shows that the various LWC event classes don't subclass the Bukkit Event class, so you can't use them in Bukkit event handlers.

    You'll need to read up more on the LWC API and how to handle its events.
     
  6. Offline

    chriztopia

    An then life gets crappie again... lol. Any one have some help on this one?
     
  7. Offline

    NemesisMate

    Having the same need... :S. I cant get the event listened.
     
Thread Status:
Not open for further replies.

Share This Page