Register events in multiple classes

Discussion in 'Spigot Plugin Development' started by TheSupreme, Apr 16, 2017.

  1. Greetings,

    How can I register events in multiple classes?

    My code:
    Code (Text):

        @Override
        public void onEnable()
        {
            PluginManager pm = getServer().getPluginManager();
            pm.registerEvents(this, this);
        }
     
     
  2. If you have your event in a class which is called for example DestroyBlock.java

    pm.registerEvents(new DestroyBlock(), this);
     
    • Agree Agree x 2
  3. this should help xD