Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Cjsah committed Nov 26, 2021
1 parent bff2786 commit 0b0c2f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/main/java/net/cjsah/console/plugin/PluginLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ private static Plugin getPlugin(File file) throws Exception {
Class<?> clazz = Class.forName(main, true, ucl);
Plugin plugin = (Plugin) clazz.getDeclaredConstructor().newInstance();
plugin.init(info);

return plugin;
}
}
2 changes: 2 additions & 0 deletions src/main/kotlin/net/cjsah/console/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ fun main() {
return
}

Console.permissions.init()

ConsoleCommand.register()

Console.start(config.getLong("account"), config.getString("password"))
Expand Down
6 changes: 4 additions & 2 deletions src/main/kotlin/net/cjsah/console/Permissions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ class Permissions {
private val list = HashMap<String, WBList>()
private val permissions = HashMap<PermissionType, List<Long>>()

init { load() }

companion object {
fun getEmpty() = WBList(false, listOf(), listOf(), listOf(), listOf())
}

fun init() {
load()
}

fun reload() {
list.clear()
load()
Expand Down

0 comments on commit 0b0c2f4

Please sign in to comment.