diff options
| author | Sho Sakuma <me@m1sk9.dev> | 2026-01-17 16:06:35 +0900 |
|---|---|---|
| committer | Sho Sakuma <me@m1sk9.dev> | 2026-01-17 16:06:35 +0900 |
| commit | 489cb88c059ebc9f37c3b1410f2fe073a4b159a8 (patch) | |
| tree | 295db4f5fee736a0e5343f189261351a54219076 | |
| parent | d264ed43434f4bc294e38b7aced813cafd48b152 (diff) | |
| download | LunaticChat-489cb88c059ebc9f37c3b1410f2fe073a4b159a8.tar.gz LunaticChat-489cb88c059ebc9f37c3b1410f2fe073a4b159a8.tar.bz2 LunaticChat-489cb88c059ebc9f37c3b1410f2fe073a4b159a8.zip | |
feat: Add `directMessageNotice` settings
5 files changed, 15 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5532b20..7d5ffca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,6 @@ - Change so that Japanese input settings are enabled by default. - Improved certain modules to eliminate Paper dependencies. - Added notification feature for receiving direct messages via `/tell` and `/reply`. -- Fixed an issue where the internal API documentation for LunaticChat published at `lc.api.m1sk9.dev` only referenced the `platform-paper` module. ### v0.3.1 diff --git a/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/permission/LunaticChatPermissionNode.kt b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/permission/LunaticChatPermissionNode.kt index 052e2ee..eab7d45 100644 --- a/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/permission/LunaticChatPermissionNode.kt +++ b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/permission/LunaticChatPermissionNode.kt @@ -9,6 +9,8 @@ sealed class LunaticChatPermissionNode( object JapaneseToggle : LunaticChatPermissionNode("lunaticchat.command.jp") + object NoticeToggle : LunaticChatPermissionNode("lunaticchat.command.notice") + object Spy : LunaticChatPermissionNode("lunaticchat.spy") object NoticeUpdate : LunaticChatPermissionNode("lunaticchat.noticeUpdate") diff --git a/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/settings/PlayerChatSettings.kt b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/settings/PlayerChatSettings.kt index 12eda6a..e970ae9 100644 --- a/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/settings/PlayerChatSettings.kt +++ b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/settings/PlayerChatSettings.kt @@ -8,10 +8,12 @@ import java.util.UUID * * @property uuid The unique identifier of the player * @property japaneseConversionEnabled Whether romaji-to-Japanese conversion is enabled for this player + * @property directMessageNotificationEnabled Whether direct message notifications are enabled for this player */ @Serializable data class PlayerChatSettings( @Serializable(with = UUIDSerializer::class) val uuid: UUID, val japaneseConversionEnabled: Boolean = true, + val directMessageNotificationEnabled: Boolean = true, ) diff --git a/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/settings/PlayerSettingsData.kt b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/settings/PlayerSettingsData.kt index 1fc3699..3916bbf 100644 --- a/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/settings/PlayerSettingsData.kt +++ b/engine/src/main/kotlin/dev/m1sk9/lunaticChat/engine/settings/PlayerSettingsData.kt @@ -13,10 +13,14 @@ import java.util.UUID * japaneseConversion: * ceaea267-39dd-3bac-931c-761ada671ebe: true * another-uuid-here: false + * directMessageNotification: + * ceaea267-39dd-3bac-931c-761ada671ebe: true + * another-uuid-here: false * ``` * * @property version The schema version for future compatibility * @property japaneseConversion Map of player UUIDs to their Japanese conversion enabled status + * @property directMessageNotification Map of player UUIDs to their direct message notification enabled status */ @Serializable data class PlayerSettingsData( @@ -26,4 +30,9 @@ data class PlayerSettingsData( UUID, Boolean, > = emptyMap(), + val directMessageNotification: Map< + @Serializable(with = UUIDASStringSerializer::class) + UUID, + Boolean, + > = emptyMap(), ) diff --git a/platform-paper/src/main/resources/paper-plugin.yml b/platform-paper/src/main/resources/paper-plugin.yml index 3121051..af90681 100644 --- a/platform-paper/src/main/resources/paper-plugin.yml +++ b/platform-paper/src/main/resources/paper-plugin.yml @@ -15,6 +15,8 @@ permissions: default: true lunaticchat.command.jp: default: true + lunaticchat.command.notice: + default: true lunaticchat.spy: default: op |
