feather-rs / feather

A Minecraft server implementation in Rust
Apache License 2.0
2.58k stars 142 forks source link

Add an ability to change gamemode from plugins #521

Closed Iaiao closed 2 years ago

Iaiao commented 2 years ago

Add an ability to change gamemode from plugins

Status

Description

Adds GamemodeEvent, InstabreakChangeEvent, FlyingAbilityChangeEvent, BuildingAbilityChangeEvent, and InvulnerabilityChangeEvent. This code was taken from #487 (I had to implement this for /gamemode command), but I think this change deserves a separate PR.

Related issues

Checklist

Note: if you locally don't get any errors, but GitHub Actions fails (especially at clippy) you might want to check your rust toolchain version. You can then feel free to fix these warnings/errors in your PR.