From 365bed9783a8f943b47eb03264932732f1305348 Mon Sep 17 00:00:00 2001 From: IzzelAliz Date: Sun, 8 Mar 2020 02:22:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E7=9F=A5=E9=81=93=E4=BB=80=E4=B9=88?= =?UTF-8?q?=E6=AF=9B=E7=97=85=EF=BC=8C=E5=8F=8D=E6=AD=A3=E5=B0=B1=E8=BF=99?= =?UTF-8?q?=E6=A0=B7=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scala/io/izzel/taboolib/loader/ScalaPlugin.scala | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/scala/io/izzel/taboolib/loader/ScalaPlugin.scala b/src/main/scala/io/izzel/taboolib/loader/ScalaPlugin.scala index 5b59a8b..66b9291 100644 --- a/src/main/scala/io/izzel/taboolib/loader/ScalaPlugin.scala +++ b/src/main/scala/io/izzel/taboolib/loader/ScalaPlugin.scala @@ -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 = {}