Fix multi-character prefixes
This commit is contained in:
parent
49f9bb8552
commit
cdd0273d39
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ public class CommandProcessor {
|
||||||
// returns true if it is a command and should be cancelled
|
// returns true if it is a command and should be cancelled
|
||||||
public static boolean processChatMessage(String message) {
|
public static boolean processChatMessage(String message) {
|
||||||
if (message.startsWith(Config.getConfig().prefix)) {
|
if (message.startsWith(Config.getConfig().prefix)) {
|
||||||
String[] parts = message.substring(1).split(" ", 2);
|
String[] parts = message.substring(Config.getConfig().prefix.length()).split(" ", 2);
|
||||||
String name = parts.length>0 ? parts[0] : "";
|
String name = parts.length>0 ? parts[0] : "";
|
||||||
String args = parts.length>1 ? parts[1] : "";
|
String args = parts.length>1 ? parts[1] : "";
|
||||||
Command c = commandMap.get(name.toLowerCase(Locale.ROOT));
|
Command c = commandMap.get(name.toLowerCase(Locale.ROOT));
|
||||||
|
|
Loading…
Reference in a new issue