Update PluginUtils.java
This commit is contained in:
parent
ccc1d69707
commit
eaf9bac6ec
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user