Only cursor aim players may set or clear a node's cursor

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVREx3uo7nz1FEhzveWTUh
This commit is contained in:
Claude committed 2026-11-11 17:57:43 +01:00
1 parent 0c8af898ae
commit 433311a1c9
1 file changed
+5 -1
@@ -10,6 +10,10 @@ public final class CursorAimServer {
}
public static void accept(ServerPlayer player, boolean active, double cf, double cr, double cu) {
// Only a player who chose cursor aim may set or clear the cursor of a node
if (!ControlMode.isCursorAim(player)) {
return;
}
Entity vehicle = player.getVehicle();
if (!(vehicle instanceof SeatEntityEntity)) {
return;
@@ -20,7 +24,7 @@ public final class CursorAimServer {
}
long nodeKey = basis.nodePos().asLong();
double length = Math.sqrt(cf * cf + cr * cr + cu * cu);
if (!active || !ControlMode.isCursorAim(player) || !CursorAimConfig.ENABLED.get() || !(length > 1.0E-6) || !Double.isFinite(length)) {
if (!active || !CursorAimConfig.ENABLED.get() || !(length > 1.0E-6) || !Double.isFinite(length)) {
CursorAimRegistry.clear(nodeKey);
return;
}