mirror of
https://github.com/azalea-rs/azalea-hax.git
synced 2025-08-02 06:16:05 +00:00
add usage example in readme
This commit is contained in:
parent
933676b7a3
commit
ce9c39d275
2 changed files with 14 additions and 0 deletions
12
README.md
12
README.md
|
@ -2,6 +2,18 @@
|
|||
|
||||
An [Azalea](https://github.com/azalea-rs/azalea) plugin with useful features that will probably trigger anticheats.
|
||||
|
||||
## Usage
|
||||
|
||||
```rust
|
||||
async fn handle(mut bot: Client, event: azalea::Event, state: State) -> anyhow::Result<()> {
|
||||
match event {
|
||||
azalea::Event::Init => {
|
||||
bot.set_anti_knockback(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- Anti-knockback
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#![doc = include_str!("../README.md")]
|
||||
|
||||
use azalea::{
|
||||
app::{App, Plugin, PreUpdate},
|
||||
ecs::prelude::*,
|
||||
|
|
Loading…
Add table
Reference in a new issue