You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[~] Fixed console colors could not be correctly displayed in Windows terminal.
[+] Added @eventhandler annotation.
[+] Added bukkit-like event system and its dispatcher
[+] Added EntityEmergedEvent
[+] Added PlayerMoveEvent
[~] Improved code structure.
[-] Removed useless classes.
[+] Added Win32ColorSerializer for windows style color rendering.
[~] Added Player interfaces for plugin development
[~] Improved Logging system.
- You can also refer to the example plugin in folder `/example-plugin/example_plugin` for help, or you can base on this demo plugin as your template to develop your own plugin.
87
+
- After you package your plugin, put the packaged plugin in folder `/plugins` (Global plugin directory).
88
+
- If you only want to apply a plugin to a specified bot, put plugin into `/plugin/<Bot Profile Name>` (Automatically
89
+
generated by DolphinBot.)
90
+
91
+
## 3. Register Event Handlers:
92
+
93
+
In order to make DolphinAPI more easy-used and scalable, DolphinBot also provides a Bukkit-like Event APIs.
94
+
95
+
### `@EventHandler` Annotation:
96
+
97
+
- The `@EventHandler` is aimed mark methods as handleable actions. Whenever `@EventHandler` is declared on methods,
98
+
it will inject the inner method code into `EventDispatcher` by using reflects.
99
+
`@EventHandler` has an optional parameter, namely handling priority, which is classified by `EventPriority` enum.
- You can also refer to the example plugin in folder `/example-plugin/example_plugin` for help, or you can base on this demo plugin as your template to develop your own plugin.
87
-
- After you package your plugin, put the packaged plugin in folder `/plugins`.
0 commit comments