mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-05 02:10:14 +01:00
Parse "detailed" as TRUE.
This commit is contained in:
parent
a9fe6afa01
commit
6c8bda24fd
@ -209,7 +209,7 @@ class CommandPacket extends CommandBase {
|
||||
ConnectionSide side = parseSide(args, 1, ConnectionSide.BOTH);
|
||||
|
||||
Integer lastIndex = args.length - 1;
|
||||
Boolean detailed = parseBoolean(args, lastIndex);
|
||||
Boolean detailed = parseBoolean(args, "detailed", lastIndex);
|
||||
|
||||
// See if the last element is a boolean
|
||||
if (detailed == null) {
|
||||
@ -495,10 +495,12 @@ class CommandPacket extends CommandBase {
|
||||
}
|
||||
|
||||
// Parse a boolean
|
||||
private Boolean parseBoolean(String[] args, int index) {
|
||||
private Boolean parseBoolean(String[] args, String parameterName, int index) {
|
||||
if (index < args.length) {
|
||||
if (args[index].equalsIgnoreCase("true"))
|
||||
return true;
|
||||
else if (args[index].equalsIgnoreCase(parameterName))
|
||||
return true;
|
||||
else if (args[index].equalsIgnoreCase("false"))
|
||||
return false;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user