mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-23 03:15:10 -06:00
More unification work
This commit is contained in:
parent
eac33d6c29
commit
9230661db6
1 changed files with 2 additions and 2 deletions
|
|
@ -65,7 +65,7 @@ object ClassScanner {
|
|||
}
|
||||
|
||||
fun load() {
|
||||
val result = ClassGraph().enableClassInfo().enableAnnotationInfo().scan()
|
||||
var result = ClassGraph().enableClassInfo().enableAnnotationInfo().scan()
|
||||
result.getClassesWithAnnotation("core.plugin.Initializable").forEach(Consumer { p: ClassInfo ->
|
||||
try {
|
||||
definePlugin(p.loadClass().newInstance() as Plugin<Object>)
|
||||
|
|
@ -82,7 +82,7 @@ object ClassScanner {
|
|||
PlayerScripts.identifierMap[identifier] =
|
||||
PlayerScripts.PlayerScript(identifier, description, name, res.loadClass())
|
||||
}
|
||||
result.getClassesImplementing("api.StartupListener").filter { !it.isAbstract }.forEach {
|
||||
result.getClassesImplementing("api.StartupListener").forEach {
|
||||
try {
|
||||
val clazz = it.loadClass().newInstance() as StartupListener
|
||||
GameWorld.startupListeners.add(clazz)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue