From 7669801e6998753b33b1c6927356d10cbd0f20ae Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Sat, 13 Jul 2019 06:11:54 +0200 Subject: [PATCH] #2671: Fix command packet parsing for Float/Double arguments --- .../main/java/net/md_5/bungee/protocol/packet/Commands.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java index 758a3397..1b0e4474 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Commands.java @@ -357,7 +357,7 @@ public class Commands extends DefinedPacket { byte flags = buf.readByte(); float min = ( flags & 0x1 ) != 0 ? buf.readFloat() : -Float.MAX_VALUE; - float max = ( flags & 0x2 ) != 0 ? buf.readFloat() : -Float.MAX_VALUE; + float max = ( flags & 0x2 ) != 0 ? buf.readFloat() : Float.MAX_VALUE; return FloatArgumentType.floatArg( min, max ); } @@ -386,7 +386,7 @@ public class Commands extends DefinedPacket { byte flags = buf.readByte(); double min = ( flags & 0x1 ) != 0 ? buf.readDouble() : -Double.MAX_VALUE; - double max = ( flags & 0x2 ) != 0 ? buf.readDouble() : -Double.MAX_VALUE; + double max = ( flags & 0x2 ) != 0 ? buf.readDouble() : Double.MAX_VALUE; return DoubleArgumentType.doubleArg( min, max ); }