Skip to content

Commit a8343b7

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

File tree

1 file changed

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

1 file changed

+3
-7
lines changed

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

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

8585
private fun loadAdditionalModules() {
8686
try {
87-
Class.forName(
88-
"com.mairwunnx.projectessentials.cooldown.essentials.CommandsAliases"
89-
)
87+
Class.forName(cooldownAPIClassPath)
9088
cooldownsInstalled = true
9189
} catch (_: ClassNotFoundException) {
9290
// ignored
9391
}
9492

9593
try {
96-
Class.forName(
97-
"com.mairwunnx.projectessentials.permissions.permissions.PermissionsAPI"
98-
)
94+
Class.forName(permissionAPIClassPath)
9995
permissionsInstalled = true
10096
} catch (_: ClassNotFoundException) {
10197
// ignored
@@ -111,7 +107,7 @@ class EntryPoint : EssBase() {
111107
if (permissionsInstalled) {
112108
PermissionsAPI.hasPermission(player.name.string, node)
113109
} else {
114-
player.server.opPermissionLevel >= opLevel
110+
player.hasPermissionLevel(opLevel)
115111
}
116112
}
117113
}

0 commit comments

Comments
 (0)