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:
@@ -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 )
|
||||
|
Reference in New Issue
Block a user