chat channel: add target mode config
This commit is contained in:
@@ -68,6 +68,17 @@ public interface ChatChannelConfig extends Config
|
|||||||
return 20;
|
return 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "targetMode",
|
||||||
|
name = "Target mode",
|
||||||
|
description = "Enables target changing mode via /f, /c, and /g which controls which channel messages are sent to.",
|
||||||
|
position = 1
|
||||||
|
)
|
||||||
|
default boolean targetMode()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "clanChatIcons",
|
keyName = "clanChatIcons",
|
||||||
name = "Chat Icons",
|
name = "Chat Icons",
|
||||||
|
|||||||
@@ -172,7 +172,15 @@ public class ChatChannelPlugin extends Plugin
|
|||||||
chats = null;
|
chats = null;
|
||||||
clientThread.invoke(() -> colorIgnoredPlayers(Color.WHITE));
|
clientThread.invoke(() -> colorIgnoredPlayers(Color.WHITE));
|
||||||
rebuildFriendsChat();
|
rebuildFriendsChat();
|
||||||
inputMode = null;
|
|
||||||
|
if (inputMode != null)
|
||||||
|
{
|
||||||
|
clientThread.invoke(() ->
|
||||||
|
{
|
||||||
|
switchTypingMode(null);
|
||||||
|
client.runScript(ScriptID.CHAT_PROMPT_INIT);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -187,6 +195,15 @@ public class ChatChannelPlugin extends Plugin
|
|||||||
|
|
||||||
Color ignoreColor = config.showIgnores() ? config.showIgnoresColor() : Color.WHITE;
|
Color ignoreColor = config.showIgnores() ? config.showIgnoresColor() : Color.WHITE;
|
||||||
clientThread.invoke(() -> colorIgnoredPlayers(ignoreColor));
|
clientThread.invoke(() -> colorIgnoredPlayers(ignoreColor));
|
||||||
|
|
||||||
|
if (inputMode != null && !config.targetMode())
|
||||||
|
{
|
||||||
|
clientThread.invoke(() ->
|
||||||
|
{
|
||||||
|
switchTypingMode(null);
|
||||||
|
client.runScript(ScriptID.CHAT_PROMPT_INIT);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -600,6 +617,11 @@ public class ChatChannelPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
case "preChatSendpublic":
|
case "preChatSendpublic":
|
||||||
{
|
{
|
||||||
|
if (!config.targetMode())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final String chatboxInput = client.getVar(VarClientStr.CHATBOX_TYPED_TEXT);
|
final String chatboxInput = client.getVar(VarClientStr.CHATBOX_TYPED_TEXT);
|
||||||
switch (chatboxInput)
|
switch (chatboxInput)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user