mirror of
https://github.com/aikar/commands.git
synced 2026-06-28 09:28:27 +00:00
Sanitize Bukkit Command Label Before Passing On (#149)
Fixes #146 This might not be the 100% perfect method for fixing this, but as it stands, it's the least amount of diff needed to fix said issue.
This commit is contained in:
committed by
Daniel Ennis
parent
422238b477
commit
786ebe831f
@@ -10,3 +10,4 @@ If you open a PR and are not already in this file, please feel free to add yours
|
||||
* [***kashike***](https://github.com/aikar/commands/commits?author=kashike) - Sponge Support, Random nit picks
|
||||
* [***Williambraecky***](https://github.com/aikar/commands/commits?author=Williambraecky) - BungeeCord Support
|
||||
* [***dumptruckman***](https://github.com/aikar/commands/commits?author=dumptruckman) - JDA Support
|
||||
* [***willies952002***](https://github.com/aikar/commands/commits?author=willies952002)
|
||||
|
||||
@@ -60,6 +60,7 @@ public class BukkitRootCommand extends Command implements RootCommand {
|
||||
|
||||
@Override
|
||||
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
||||
if (commandLabel.contains(":")) commandLabel = ACFPatterns.COLON.split(commandLabel, 2)[1];
|
||||
execute(manager.getCommandIssuer(sender), commandLabel, args);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user