mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 22:03:03 +08:00
Move command prefix stripping to ChatManager
This commit is contained in:
parent
82ec63c4e4
commit
5aba7da7ef
@ -113,10 +113,6 @@ public final class CommandMap {
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove prefix if present.
|
||||
if (!Character.isLetter(rawMessage.charAt(0)))
|
||||
rawMessage = rawMessage.substring(1);
|
||||
|
||||
// Parse message.
|
||||
String[] split = rawMessage.split(" ");
|
||||
List<String> args = new LinkedList<>(Arrays.asList(split));
|
||||
|
@ -34,7 +34,7 @@ public class ChatManager {
|
||||
|
||||
// Check if command
|
||||
if (PREFIXES.contains(message.charAt(0))) {
|
||||
CommandMap.getInstance().invoke(player, target, message);
|
||||
CommandMap.getInstance().invoke(player, target, message.substring(1));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user