Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Feature: API to switch items in the offhand/mainhand (#4819)
Dieser Commit ist enthalten in:
Ursprung
48311f8771
Commit
813d197887
@ -81,4 +81,10 @@ public interface EntityData {
|
|||||||
* @return whether the movement is locked
|
* @return whether the movement is locked
|
||||||
*/
|
*/
|
||||||
boolean isMovementLocked();
|
boolean isMovementLocked();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends a request to the Java server to switch the items in the main and offhand.
|
||||||
|
* There is no guarantee of the server accepting the request.
|
||||||
|
*/
|
||||||
|
void switchHands();
|
||||||
}
|
}
|
||||||
|
@ -96,4 +96,9 @@ public class GeyserEntityData implements EntityData {
|
|||||||
public boolean isMovementLocked() {
|
public boolean isMovementLocked() {
|
||||||
return !movementLockOwners.isEmpty();
|
return !movementLockOwners.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void switchHands() {
|
||||||
|
session.requestOffhandSwap();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren