Solved Two implementations?

Discussion in 'Plugin Development' started by MomsKnife, Aug 29, 2014.

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

    MomsKnife

    I need to implement two things in my plugin, but it won't let me, any ideas?

    Example:
    public class HubBasics extends JavaPlugin implements Listener implements PluginMessageListener {}
    ^ That won't work
     
  2. Offline

    chaseoes

    Code:java
    1. public class HubBasics extends JavaPlugin implements Listener, PluginMessageListener {}

    Some basic Java knowledge would help you while creating plugins. :)
     
  3. Offline

    jojo1541

    Or use a seperate class for the second Listener an implement it via
    Code:
    PluginManager PM = getServer().getPluginManager();
     
    PM.registerEvents(YourListenerClass, this);
     
  4. Offline

    MomsKnife

    yeah, I already did that.. That doesn't work either, which is what it stumping me.
     
  5. Offline

    chaseoes

    What do you mean by doesn't work?
     
  6. Offline

    MomsKnife

    It doesn't throw errors, but none of the code in the method is thrown when the event is called.

    Agh ignore me I forgot to register the events, I only registered the outgoing plugin channel.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
Thread Status:
Not open for further replies.

Share This Page