Skip to content

Commit 9a489f0

Browse files
committed
Uses cooldownAPIClassPath from CoreAPI.
Uses `permissionAPIClassPath` from CoreAPI. Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent c77badd commit 9a489f0

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

  • src/main/kotlin/com/mairwunnx/projectessentials/warps

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,14 @@ class EntryPoint : EssBase() {
4646

4747
private fun loadAdditionalModules() {
4848
try {
49-
Class.forName(
50-
"com.mairwunnx.projectessentials.cooldown.essentials.CommandsAliases"
51-
)
49+
Class.forName(cooldownAPIClassPath)
5250
cooldownsInstalled = true
5351
} catch (_: ClassNotFoundException) {
5452
// ignored
5553
}
5654

5755
try {
58-
Class.forName(
59-
"com.mairwunnx.projectessentials.permissions.permissions.PermissionsAPI"
60-
)
56+
Class.forName(permissionAPIClassPath)
6157
permissionsInstalled = true
6258
} catch (_: ClassNotFoundException) {
6359
// ignored
@@ -79,7 +75,7 @@ class EntryPoint : EssBase() {
7975
if (permissionsInstalled) {
8076
PermissionsAPI.hasPermission(player.name.string, node)
8177
} else {
82-
player.server.opPermissionLevel >= 0
78+
player.hasPermissionLevel(0)
8379
}
8480
}
8581
}

0 commit comments

Comments
 (0)