From 4149b5719e0fa833818274975e7deda5f4a83dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9D=8F=E9=BB=91?= Date: Sun, 21 Jul 2019 13:57:59 +0800 Subject: [PATCH] Update SimpleVersionControl.java --- .../io/izzel/taboolib/module/lite/SimpleVersionControl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/scala/io/izzel/taboolib/module/lite/SimpleVersionControl.java b/src/main/scala/io/izzel/taboolib/module/lite/SimpleVersionControl.java index 4ed70c7..0222c3a 100644 --- a/src/main/scala/io/izzel/taboolib/module/lite/SimpleVersionControl.java +++ b/src/main/scala/io/izzel/taboolib/module/lite/SimpleVersionControl.java @@ -3,6 +3,7 @@ package io.izzel.taboolib.module.lite; import com.google.common.collect.Lists; import io.izzel.taboolib.TabooLib; import io.izzel.taboolib.Version; +import io.izzel.taboolib.common.plugin.InternalPlugin; import io.izzel.taboolib.common.plugin.bridge.BridgeLoader; import io.izzel.taboolib.util.Files; import io.izzel.taboolib.util.Ref; @@ -121,7 +122,7 @@ public class SimpleVersionControl { classReader.accept(classVisitor, ClassReader.EXPAND_FRAMES); classWriter.visitEnd(); classVisitor.visitEnd(); - Class newClass = AsmClassLoader.createNewClass(target, classWriter.toByteArray()); + Class newClass = plugin instanceof InternalPlugin ? AsmClassLoader.createNewClass(target, classWriter.toByteArray()) : BridgeLoader.createNewClass(target, classWriter.toByteArray()); if (useCache) { cacheClasses.put(target, newClass); }