aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-01-28 15:31:17 -0600
committeringlettronald <inglettronald@gmail.com>2023-01-28 15:31:17 -0600
commitd87f25e4b82bd7bd2c15943c23c685cafefad20f (patch)
tree738c554840a544bd3e1b75b58cfeb7ff3f78470c /src/main/kotlin/dulkirmod
parent7b6fef2966838dffcdecb5870204d363811f4b4f (diff)
parent0592807a5e75dcde0288b5fc9a45bf47a5c17f8e (diff)
downloadDulkirMod-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.kt5
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) {
+ }
}
}
}