diff options
author | inglettronald <inglettronald@gmail.com> | 2023-01-28 15:31:17 -0600 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-01-28 15:31:17 -0600 |
commit | d87f25e4b82bd7bd2c15943c23c685cafefad20f (patch) | |
tree | 738c554840a544bd3e1b75b58cfeb7ff3f78470c /src/main/kotlin/dulkirmod | |
parent | 7b6fef2966838dffcdecb5870204d363811f4b4f (diff) | |
parent | 0592807a5e75dcde0288b5fc9a45bf47a5c17f8e (diff) | |
download | DulkirMod-d87f25e4b82bd7bd2c15943c23c685cafefad20f.tar.gz DulkirMod-d87f25e4b82bd7bd2c15943c23c685cafefad20f.tar.bz2 DulkirMod-d87f25e4b82bd7bd2c15943c23c685cafefad20f.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/main/kotlin/dulkirmod')
-rw-r--r-- | src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt b/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt index f0a5cb0..9212bbd 100644 --- a/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt +++ b/src/main/kotlin/dulkirmod/features/chat/AbiphoneDND.kt @@ -19,7 +19,10 @@ class AbiphoneDND { if (System.currentTimeMillis() - lastRing < 5000) { if (event.name == "note.pling" && event.sound.volume == 0.69f && event.sound.pitch == 1.6666666f) { // This throws an error but still blocks the sound. Not a great solution, but it works for now - event.isCanceled = true + try { + event.isCanceled = true + } catch (ignored: IllegalArgumentException) { + } } } } |