Development Assistance How to have multiple classes

Discussion in 'Plugin Help/Development/Requests' started by RanterMC, Feb 25, 2016.

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


    Hey guys.

    I'm new to coding and I have a question.

    So I want to make a plugin with some commands and events and in every separate class I want to have a specific command/event etc.

    What do I have to write in the Main class to like "connect" those classes?
  2. Offline


    @RanterMC Well, this is just basic Java knowledge. I recommend going back and learning a bit more about Java before trying to take on Bukkit.
    Tecno_Wizard likes this.
  3. Offline


    @Gerov Not really.
    @RanterMC This is, however, basic Bukkit knowledge. To add a new listener: Make a new class that implements Listener. Then, register it like normal with the plugin manager. To add a new command, make a new class that implements CommandExecutor. Then, pass an instance of it to getCommand("command name").setExecutor(CommandExecutor);
  4. Offline


    @pie_flavor The ability to transfer data and call methods between classes is basic Java knowledge.
  5. Offline


    @Gerov But not how to register multiple listeners or command executors.
Thread Status:
Not open for further replies.

Share This Page