mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
init: switch hands api
This commit is contained in:
parent
ff1e1dd7e3
commit
18e329c69b
2 changed files with 10 additions and 0 deletions
|
|
@ -81,4 +81,9 @@ public interface EntityData {
|
|||
* @return whether the movement is locked
|
||||
*/
|
||||
boolean isMovementLocked();
|
||||
|
||||
/**
|
||||
* Allows switching the current items in the main and offhand.
|
||||
*/
|
||||
void switchHands();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,4 +96,9 @@ public class GeyserEntityData implements EntityData {
|
|||
public boolean isMovementLocked() {
|
||||
return !movementLockOwners.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void switchHands() {
|
||||
session.requestOffhandSwap();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue