Skip to content

Commit dcb847d

Browse files
committed
Not correctly worked cooldowns fixed.
Url matching in message improved. Compiler errors fixed. Version changed to semver. Dependencies updated. Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent ae149ef commit dcb847d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main/kotlin/com/mairwunnx/projectessentials/chat/ChatCooldown.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ object ChatCooldown {
3131
val duration = Duration.between(commandExecutionTime, dateTimeNow)
3232
return duration.toKotlinDuration().inSeconds
3333
}
34-
throw KotlinNullPointerException(
35-
"An error occurred while getting chat cooldown date time by nickname ($nickname)"
36-
)
34+
return Double.MAX_VALUE
3735
}
3836
}

src/main/kotlin/com/mairwunnx/projectessentials/chat/EntryPoint.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class EntryPoint : EssBase() {
9797

9898
if (!ChatModelUtils.chatModel.moderation.advertisingAllowed) {
9999
if (!hasPermission(event.player, "ess.chat.advertising.bypass", 3)) {
100-
if (event.message.matches(
100+
if (event.message.contains(
101101
Regex(
102102
ChatModelUtils.chatModel.moderation.advertisingRegex,
103103
RegexOption.IGNORE_CASE

0 commit comments

Comments
 (0)