mirror of
https://github.com/azalea-rs/azalea-hax.git
synced 2025-08-02 23:44:39 +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.
|
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
|
## Features
|
||||||
|
|
||||||
- Anti-knockback
|
- Anti-knockback
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![doc = include_str!("../README.md")]
|
||||||
|
|
||||||
use azalea::{
|
use azalea::{
|
||||||
app::{App, Plugin, PreUpdate},
|
app::{App, Plugin, PreUpdate},
|
||||||
ecs::prelude::*,
|
ecs::prelude::*,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue