Building the project is really easy. First you'll have to clone the repository: git clone https://github.com/illuminator3/EventSystem
after that's done building the project can be done by running gradle build
.
Add the jitpack repository:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
Find the correct commit version (e.g. 7c52229960) (can also be found here). Use it as the dependency version:
<dependency>
<groupId>com.github.illuminator3</groupId>
<artifactId>EventSystem</artifactId>
<version>[version]</version>
</dependency>
Register the jitpack repository:
maven { url 'https://jitpack.io' }
Find the version here and add the dependency:
implementation 'com.github.illuminator3:EventSystem:<version>'
Import the root package:
import me.illuminator3.event.*;
You can now add a listener by using the EventSystem#addListener
function (who could've guessed lol):
EventSystem.addListener(myListener);
Calling an event is done by invoking the EventSystem#call
method:
EventSystem.call(myEvent);
Adding a filter is also really easy, just call the EventSystem#addFilter
method:
EventSystem.addFilter(myFilter);
Removing a certain listener/filter can be done by invoking either the EventSystem#removeListener
or EventSystem#addListener
method:
EventSystem.removeFilter(myFilter); // Removing a filter
EventSystem.removeListener(myListener); // Remove a listener
You can contribute by creating an issue or pull request. Please keep the code clean and readable. All contributed code must be in the already present code format.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details
- Commercial use
- Modification
- Distribution
- Patent use
- Private use
- Trademark use
- Liability
- Warranty