Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Signed-off-by: 7orivorian <7orivorian+github@gmail.com>
  • Loading branch information
7orivorian committed Jun 4, 2024
1 parent fe848b4 commit 47c7d02
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ Packaged file can be found in the `target/` directory.
While the code itself is thoroughly documented, here's a simple guide to help you get started with the latest features.

### Subscribers
<details>
<summary><i>Details...</i></summary>

To define a subscriber, you have multiple options:

Expand Down Expand Up @@ -113,8 +115,11 @@ public class Example {
}
}
```
</details>

### Defining Events
<details>
<summary><i>Details...</i></summary>

Any class can be used as an event. For instance:

Expand Down Expand Up @@ -153,8 +158,11 @@ public class CancelableEvent implements ICancelable {
// ...
}
```
</details>

### Listeners
<details>
<summary><i>Details...</i></summary>

For class event listeners, you can define your listeners as follows:

Expand Down Expand Up @@ -201,8 +209,11 @@ public class ExampleSubscriber extends Subscriber {
}
}
```
</details>

### Dispatching Events
<details>
<summary><i>Details...</i></summary>

To dispatch an event to an event bus, simply call one of the `dispatch` methods defined in any `IEventBus`
implementation, passing your event as a parameter:
Expand All @@ -226,6 +237,7 @@ public class Example {
}
}
```
</details>

Feel free to explore the [example folder](examples/java/me/tori/example) for more Wraith implementations.

Expand Down

0 comments on commit 47c7d02

Please sign in to comment.