Skip to content

Commit

Permalink
Fix .look
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisTestUser committed Sep 10, 2023
1 parent d40106b commit d441d76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/net/wurstclient/commands/LookCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ public void call(String[] args) throws CmdException
if(!args[0].equalsIgnoreCase("skip"))
{
if(!MathUtils.isDouble(args[0]))
throw new CmdSyntaxError("Yaw is not an integer!");
throw new CmdSyntaxError("Yaw is not a number!");
float yaw = Float.parseFloat(args[0]);
if(Math.abs(yaw) > 180)
throw new CmdSyntaxError("Invaild yaw!");
throw new CmdSyntaxError("Invalid yaw!");
MC.player.setYaw(yaw);
}
if(!args[1].equalsIgnoreCase("skip"))
{
if(!MathUtils.isDouble(args[1]))
throw new CmdSyntaxError("Pitch is not an integer!");
throw new CmdSyntaxError("Pitch is not a number!");
float pitch = Float.parseFloat(args[1]);
if(Math.abs(pitch) > 90)
throw new CmdSyntaxError("Invaild pitch!");
throw new CmdSyntaxError("Invalid pitch!");
MC.player.setPitch(pitch);
}
}
Expand Down

0 comments on commit d441d76

Please sign in to comment.