From 51efbd3dad8641dd553101efbe3d6fa3fee2f79f Mon Sep 17 00:00:00 2001 From: Nate R <4064388+TerrrorByte@users.noreply.github.com> Date: Tue, 7 Jun 2022 20:31:55 -0500 Subject: [PATCH] Update Booster.kt Fixed unsafe call to "active" --- .../src/main/kotlin/com/willfp/boosters/boosters/Booster.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/boosters/Booster.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/boosters/Booster.kt index 7ad1c6b..d4d4bb1 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/boosters/Booster.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/boosters/boosters/Booster.kt @@ -151,7 +151,9 @@ class Booster( plugin, "${id}_name", ) { - active?.booster.name ?: "" + val active = this.active + + active?.booster?.name ?: "" } )