Fix jail check not tab completing online names

This commit is contained in:
graywolf336 2015-06-29 22:44:46 -05:00
parent 3225c6e853
commit a602bf77fe

View File

@ -55,10 +55,11 @@ public class JailCheckCommand implements Command {
Collections.sort(results);
if(args.length == 1)
if(args.length == 2)
for(Player p : jm.getPlugin().getServer().getOnlinePlayers())
if(!results.contains(p.getName()))
results.add(p.getName());
if(args[1].isEmpty() || StringUtil.startsWithIgnoreCase(p.getName(), args[1]))
if(!results.contains(p.getName()))
results.add(p.getName());
return results;
}