chat commands: fix kc command in friends chat

This commit is contained in:
Adam
2018-07-11 18:04:36 -04:00
parent bdeaded3ee
commit ceb62ab8dc

View File

@@ -241,12 +241,13 @@ public class ChatCommandsPlugin extends Plugin
public void onChatboxInput(ChatboxInput chatboxInput) public void onChatboxInput(ChatboxInput chatboxInput)
{ {
final String value = chatboxInput.getValue(); final String value = chatboxInput.getValue();
if (!value.startsWith("!kc ")) if (!value.startsWith("!kc ") && !value.startsWith("/!kc "))
{ {
return; return;
} }
final String boss = longBossName(value.substring(4)); int idx = value.indexOf(' ');
final String boss = longBossName(value.substring(idx + 1));
final int kc = getKc(boss); final int kc = getKc(boss);
if (kc <= 0) if (kc <= 0)