From eaf9bac6ec0a5f04db2b04d19a6e73823337d5e5 Mon Sep 17 00:00:00 2001 From: allenlol <1124796703@qq.com> Date: Tue, 2 Oct 2018 17:48:58 -0700 Subject: [PATCH] Update PluginUtils.java --- src/main/java/me/skymc/taboolib/plugin/PluginUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/skymc/taboolib/plugin/PluginUtils.java b/src/main/java/me/skymc/taboolib/plugin/PluginUtils.java index b28b211..bba458d 100644 --- a/src/main/java/me/skymc/taboolib/plugin/PluginUtils.java +++ b/src/main/java/me/skymc/taboolib/plugin/PluginUtils.java @@ -31,9 +31,9 @@ public class PluginUtils { PluginUtils() { } - private File getPluginFile(JavaPlugin plugin) { + private File getPluginFile(Plugin plugin) { try { - Method method = JavaPlugin.class.getDeclaredMethod("getFile"); + Method method = plugin.getClass().getDeclaredMethod("getFile"); method.setAccessible(true); return (File) method.invoke(plugin); } catch (ReflectiveOperationException e) {