File tree Expand file tree Collapse file tree
src/main/kotlin/com/r4g3baby/simplescore/bukkit/scoreboard
worldguard/src/main/kotlin/com/r4g3baby/simplescore/bukkit/worldguard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import kotlin.math.min
1414import kotlin.math.roundToInt
1515
1616class VarReplacer (plugin : BukkitPlugin ) : VarReplacer<Player> {
17- private val usePlaceholderAPI = plugin.server.pluginManager.isPluginEnabled (" PlaceholderAPI" )
17+ private val usePlaceholderAPI = plugin.server.pluginManager.getPlugin (" PlaceholderAPI" ) != null
1818
1919 override fun replace (text : String , viewer : Player ): String {
2020 var result = if (usePlaceholderAPI) PlaceholderAPI .setPlaceholders(viewer, text) else text
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ object WorldGuardAPI {
99 private lateinit var worldguard: IWorldGuard
1010
1111 fun initialize () {
12- if (! Bukkit .getPluginManager().isPluginEnabled (" WorldGuard" )) return
12+ if (Bukkit .getPluginManager().getPlugin (" WorldGuard" ) == null ) return
1313
1414 if (classExists(" com.sk89q.worldguard.WorldGuard" )) {
1515 worldguard = com.r4g3baby.simplescore.bukkit.worldguard.v7.WorldGuardImpl ()
You can’t perform that action at this time.
0 commit comments