Skip to content

Commit

Permalink
hot update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
noyzys authored Nov 16, 2024
1 parent 29d7921 commit 95d17fb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ implementation("dev.shiza:honey:2.0.0")
A showcase of how to use *honey*, can be found in [honey-test-plugin](honey-test-plugin) module.

```java
## With Formatter placeholder:

/* for titles::audience */
dispatcher.createTitle()
.recipient(event.getPlayer())
Expand All @@ -69,4 +71,18 @@ dispatcher.createActionBar()
.dispatch();
```

## Without formatter, plain template:
```java
AdventureMessageDispatcher.createChat()
.recipient(Bukkit.getServer())
.template(Component.text("Somebody joined to the server!").color(NamedTextColor.RED))
.dispatch();

AdventureMessageDispatcher.createActionBar()
.recipient(event.getPlayer())
.template(formatter, "Honey is great, isn't it?")
.dispatch();
}
```

![test-plugin showcase](assets/image.png)

0 comments on commit 95d17fb

Please sign in to comment.