perf(bukkit): 优化代码
This commit is contained in:
@@ -161,7 +161,7 @@ public abstract class ParentCommand extends ChildCommand {
|
||||
return childCommands.stream()
|
||||
.filter(o -> o.hasPermission(sender))
|
||||
.map(ChildCommand::getName)
|
||||
.filter(o -> o.toLowerCase().startsWith(args[0]))
|
||||
.filter(o -> o.toLowerCase().startsWith(args[0].toLowerCase()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user