changes to tab completion

* PacketCBTabComplete: options for completion should be seperated by
NUL
 * PluginManager: append an empty argument to arguments if command ends
with a whitespace (this will match all suggestions)
 * PlayerCommand: suggest only matching players instead of all players
This commit is contained in:
zaiyers
2013-09-28 16:50:04 +02:00
committed by md_5
parent 891dc87b16
commit dd06937a3b
3 changed files with 28 additions and 13 deletions

View File

@@ -137,7 +137,18 @@ public class PluginManager
return true;
}
String[] args = Arrays.copyOfRange( split, 1, split.length );
String[] args;
// add empty argument for tab completion
if ( commandLine.endsWith( " " ) )
{
args = Arrays.copyOfRange( split, 1, split.length + 1 );
args[ split.length - 1] = "";
} else
{
args = Arrays.copyOfRange( split, 1, split.length );
}
try
{
if ( tabResults == null )