From 96444ae3046381fa8ba3bd8dd895b4217371b74a Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 10 Sep 2013 16:23:05 +1000 Subject: [PATCH] Fix a message consisting only of a space causing the player to be kicked. --- .../main/java/net/md_5/bungee/api/plugin/PluginManager.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java index d354565d..1ff7dd67 100644 --- a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java +++ b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java @@ -86,6 +86,12 @@ public class PluginManager public boolean dispatchCommand(CommandSender sender, String commandLine) { String[] split = argsSplit.split( commandLine ); + // Check for chat that only contains " " + if ( split.length == 0 ) + { + return false; + } + String commandName = split[0].toLowerCase(); if ( proxy.getDisabledCommands().contains( commandName ) ) {