mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-20 00:13:21 +02:00
added the handSitting toggle that enables sitting using the hand
This commit is contained in:
parent
384767b24c
commit
c2e708ba38
3 changed files with 14 additions and 0 deletions
|
@ -211,6 +211,7 @@ public class Events {
|
|||
Sit.server = s;
|
||||
Sit.commandManager = s.getCommandManager();
|
||||
UseBlockCallback.EVENT.register((pl, world, hand, hitResult) -> {
|
||||
if (!Config.handSitting) return ActionResult.PASS;
|
||||
ServerPlayerEntity player = Sit.server.getPlayerManager().getPlayer(pl.getUuid());
|
||||
if (player == null) return ActionResult.PASS;
|
||||
if (hand == net.minecraft.util.Hand.MAIN_HAND && hitResult.getType() == HitResult.Type.BLOCK) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue