Move command prefix stripping to ChatManager

This commit is contained in:
AnimeGitB 2022-05-04 17:21:15 +09:30 committed by Melledy
parent 82ec63c4e4
commit 5aba7da7ef
2 changed files with 1 additions and 5 deletions

View File

@ -113,10 +113,6 @@ public final class CommandMap {
return; return;
} }
// Remove prefix if present.
if (!Character.isLetter(rawMessage.charAt(0)))
rawMessage = rawMessage.substring(1);
// Parse message. // Parse message.
String[] split = rawMessage.split(" "); String[] split = rawMessage.split(" ");
List<String> args = new LinkedList<>(Arrays.asList(split)); List<String> args = new LinkedList<>(Arrays.asList(split));

View File

@ -34,7 +34,7 @@ public class ChatManager {
// Check if command // Check if command
if (PREFIXES.contains(message.charAt(0))) { if (PREFIXES.contains(message.charAt(0))) {
CommandMap.getInstance().invoke(player, target, message); CommandMap.getInstance().invoke(player, target, message.substring(1));
return; return;
} }