mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-24 03:05:49 +01:00
#2671: Fix command packet parsing for Float/Double arguments
This commit is contained in:
parent
941d7f7262
commit
7669801e69
@ -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 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user