Skip to content

New api of events, bug fixes and some changes.

Compare
Choose a tag to compare
@Keffisor Keffisor released this 09 Nov 23:20
· 14 commits to master since this release
  • Changed PluginListener to JavaPlugin
  • Changed some imports and fixed some bugs.
  • Now the error are full displayed on the console
  • The arguments now starts by 0.
  • New system for register events (PluginListener). You can register events as the same way as Bukkit.
public class EventTest implements PluginListener {
	/*
	With the new system of events in JDAExpansion you will be able to declare any event with a custom name, you can repeat in the same 
        class any event and you can set the priority of execution of that event.
        */
	
	@EventHandler(priority = EventPriority.MONITOR) //set the priority of the event, if it's not set, it will be NORMAL by default.
  	public void test(MessageReceivedEvent e) {
	        System.out.println(e.getMessage().getContentRaw());
  	}

	@EventHandler
	public void test2(MessageReceivedEvent e) {
		System.out.println(e.getAuthor().getAsTag());
	}

}