Skip to content

Commit

Permalink
不知道什么毛病,反正就这样了
Browse files Browse the repository at this point in the history
  • Loading branch information
IzzelAliz committed Mar 7, 2020
1 parent 15f42fb commit 365bed9
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/main/scala/io/izzel/taboolib/loader/ScalaPlugin.scala
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
package io.izzel.taboolib.loader

import org.bukkit.plugin.Plugin
import org.yaml.snakeyaml.Yaml

import scala.jdk.CollectionConverters._
import java.util.{Map => JMap}

import org.bukkit.plugin.java.JavaPlugin

class ScalaPlugin extends ScalaPluginInterface {

private val plugin = {
val stream = getClass.getResourceAsStream("/plugin.yml")
val map = new Yaml().load(stream).asInstanceOf[JMap[String, Any]].asScala
val cl = Class.forName(map("main").toString).asSubclass(classOf[JavaPlugin])
JavaPlugin.getPlugin(cl)
JavaPlugin.getPlugin(classOf[ScalaLoader])
}

override def onLoading(): Unit = {}
Expand Down

0 comments on commit 365bed9

Please sign in to comment.