Skip to content

Commit aa90f24

Browse files
committed
Uses cooldownAPIClassPath from CoreAPI.
Uses `permissionAPIClassPath` from CoreAPI. Signed-off-by: Pavel Erokhin (MairwunNx) <[email protected]>
1 parent 4b917b7 commit aa90f24

File tree

1 file changed

+3
-7
lines changed
  • src/main/kotlin/com/mairwunnx/projectessentials/home

1 file changed

+3
-7
lines changed

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

+3-7
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,14 @@ class EntryPoint : EssBase() {
5252

5353
private fun loadAdditionalModules() {
5454
try {
55-
Class.forName(
56-
"com.mairwunnx.projectessentials.cooldown.essentials.CommandsAliases"
57-
)
55+
Class.forName(cooldownAPIClassPath)
5856
cooldownsInstalled = true
5957
} catch (_: ClassNotFoundException) {
6058
// ignored
6159
}
6260

6361
try {
64-
Class.forName(
65-
"com.mairwunnx.projectessentials.permissions.permissions.PermissionsAPI"
66-
)
62+
Class.forName(permissionAPIClassPath)
6763
permissionsInstalled = true
6864
} catch (_: ClassNotFoundException) {
6965
// ignored
@@ -79,7 +75,7 @@ class EntryPoint : EssBase() {
7975
if (permissionsInstalled) {
8076
PermissionsAPI.hasPermission(player.name.string, node)
8177
} else {
82-
player.server.opPermissionLevel >= opLevel
78+
player.hasPermissionLevel(opLevel)
8379
}
8480
}
8581
}

0 commit comments

Comments
 (0)