Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #229 from SpigotMC/master
Browse files Browse the repository at this point in the history
SpigotMC#2539: Regex free command split
  • Loading branch information
sleiss authored Oct 27, 2018
2 parents 0ff226b + cb4108c commit 51671e7
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.logging.Level;
import java.util.regex.Pattern;
import lombok.RequiredArgsConstructor;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
Expand All @@ -42,7 +41,6 @@
public class PluginManager
{

private static final Pattern argsSplit = Pattern.compile( " " );
/*========================================================================*/
private final ProxyServer proxy;
/*========================================================================*/
Expand Down Expand Up @@ -126,7 +124,7 @@ public boolean dispatchCommand(CommandSender sender, String commandLine)
*/
public boolean dispatchCommand(CommandSender sender, String commandLine, List<String> tabResults)
{
String[] split = argsSplit.split( commandLine, -1 );
String[] split = commandLine.split( " ", -1 );
// Check for chat that only contains " "
if ( split.length == 0 )
{
Expand Down

0 comments on commit 51671e7

Please sign in to comment.