chatnotifications: add private message notification
This commit is contained in:
@@ -108,4 +108,15 @@ public interface ChatNotificationsConfig extends Config
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 7,
|
||||||
|
keyName = "notifyOnPM",
|
||||||
|
name = "Notify on private message",
|
||||||
|
description = "Notifies you whenever you receive a private message"
|
||||||
|
)
|
||||||
|
default boolean notifyOnPM()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,6 +165,13 @@ public class ChatNotificationsPlugin extends Plugin
|
|||||||
notifier.notify(Text.removeFormattingTags(broadcast));
|
notifier.notify(Text.removeFormattingTags(broadcast));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case PRIVATECHAT:
|
||||||
|
case MODPRIVATECHAT:
|
||||||
|
if (config.notifyOnPM())
|
||||||
|
{
|
||||||
|
notifier.notify(Text.removeTags(chatMessage.getName()) + ": " + chatMessage.getMessage());
|
||||||
|
}
|
||||||
|
break;
|
||||||
case CONSOLE:
|
case CONSOLE:
|
||||||
// Don't notify for notification messages
|
// Don't notify for notification messages
|
||||||
if (chatMessage.getName().equals(runeliteTitle))
|
if (chatMessage.getName().equals(runeliteTitle))
|
||||||
|
|||||||
Reference in New Issue
Block a user