Fix a message consisting only of a space causing the player to be kicked.
This commit is contained in:
parent
af58db8a67
commit
96444ae304
@ -86,6 +86,12 @@ public class PluginManager
|
|||||||
public boolean dispatchCommand(CommandSender sender, String commandLine)
|
public boolean dispatchCommand(CommandSender sender, String commandLine)
|
||||||
{
|
{
|
||||||
String[] split = argsSplit.split( commandLine );
|
String[] split = argsSplit.split( commandLine );
|
||||||
|
// Check for chat that only contains " "
|
||||||
|
if ( split.length == 0 )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
String commandName = split[0].toLowerCase();
|
String commandName = split[0].toLowerCase();
|
||||||
if ( proxy.getDisabledCommands().contains( commandName ) )
|
if ( proxy.getDisabledCommands().contains( commandName ) )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user