We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bb8cd8 commit 9d63cf4Copy full SHA for 9d63cf4
1 file changed
src/main/kotlin/com/mairwunnx/projectessentials/chat/api/variables/ChatVariableAPI.kt
@@ -22,13 +22,13 @@ object ChatVariableAPI {
22
*/
23
fun add(variable: IChatVariable) = synchronized(store) {
24
store.find { it.variable == variable.variable }?.let {
25
- store.add(variable).also {
26
- getLogger().debug("Chat variable (${variable.variable}) added.")
27
- }.let { return@synchronized }
28
- } ?: run {
29
getLogger().error(
30
"Chat variable `${variable.javaClass.canonicalName}` (${variable.variable}) already exist."
31
)
+ } ?: run {
+ store.add(variable).also {
+ getLogger().debug("Chat variable (${variable.variable}) added.")
+ }.let { return@synchronized }
32
}
33
34
0 commit comments