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

View File

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