Force # command prefix

This commit is contained in:
Brady 2018-08-23 20:57:32 -05:00
parent c8de4a4e00
commit 93de55318f
No known key found for this signature in database
GPG Key ID: 73A788379A197567
1 changed files with 4 additions and 3 deletions

View File

@ -55,9 +55,10 @@ public class ExampleBaritoneControl extends Behavior {
return;
}
String msg = event.getMessage();
if (msg.startsWith("/")) {
msg = msg.substring(1);
}
if (!msg.startsWith("#"))
return;
msg = msg.substring(1);
if (msg.toLowerCase().startsWith("goal")) {
event.cancel();
String[] params = msg.toLowerCase().substring(4).trim().split(" ");