Commit 5aba7da7 authored by AnimeGitB's avatar AnimeGitB Committed by Melledy
Browse files

Move command prefix stripping to ChatManager

parent 82ec63c4
...@@ -113,10 +113,6 @@ public final class CommandMap { ...@@ -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));
......
...@@ -34,7 +34,7 @@ public class ChatManager { ...@@ -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;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment