Add missing killcount command config (#4489)
Add missing toggle for enabling !kc command to chat commands config
This commit is contained in:
@@ -66,6 +66,17 @@ public interface ChatCommandsConfig extends Config
|
||||
|
||||
@ConfigItem(
|
||||
position = 3,
|
||||
keyName = "killcount",
|
||||
name = "Killcount Command",
|
||||
description = "Configures whether the Killcount command is enabled"
|
||||
)
|
||||
default boolean killcount()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 4,
|
||||
keyName = "clearShortcuts",
|
||||
name = "Clear shortcuts",
|
||||
description = "Enable shortcuts (ctrl+w and backspace) for clearing the chatbox"
|
||||
|
||||
@@ -215,7 +215,7 @@ public class ChatCommandsPlugin extends Plugin implements ChatboxInputListener
|
||||
log.debug("Running clue lookup for {}", search);
|
||||
executor.submit(() -> playerClueLookup(setMessage, search));
|
||||
}
|
||||
else if (message.toLowerCase().startsWith("!kc "))
|
||||
else if (config.killcount() && message.toLowerCase().startsWith("!kc "))
|
||||
{
|
||||
String search = message.substring(4);
|
||||
|
||||
@@ -322,7 +322,7 @@ public class ChatCommandsPlugin extends Plugin implements ChatboxInputListener
|
||||
public boolean onChatboxInput(ChatboxInput chatboxInput)
|
||||
{
|
||||
final String value = chatboxInput.getValue();
|
||||
if (!value.startsWith("!kc ") && !value.startsWith("/!kc "))
|
||||
if (!config.killcount() || !value.startsWith("!kc ") && !value.startsWith("/!kc "))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -361,7 +361,7 @@ public class ChatCommandsPlugin extends Plugin implements ChatboxInputListener
|
||||
public boolean onPrivateMessageInput(PrivateMessageInput privateMessageInput)
|
||||
{
|
||||
final String message = privateMessageInput.getMessage();
|
||||
if (!message.startsWith("!kc "))
|
||||
if (!config.killcount() || !message.startsWith("!kc "))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user