mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-22 18:55:17 +01:00
Make addon non-public and provide getter to address minor vulnerability.
This commit is contained in:
parent
7e2f8052da
commit
04a4394752
@ -22,7 +22,7 @@ import us.tastybento.bskyblock.managers.AddonsManager;
|
||||
public class AddonClassLoader extends URLClassLoader {
|
||||
|
||||
private final Map<String, Class<?>> classes = new HashMap<String, Class<?>>();
|
||||
public Addon addon;
|
||||
private Addon addon;
|
||||
private AddonsManager loader;
|
||||
|
||||
public AddonClassLoader(AddonsManager addonsManager, Map<String, String>data, File path, BufferedReader reader, ClassLoader parent)
|
||||
@ -116,4 +116,11 @@ public class AddonClassLoader extends URLClassLoader {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the addon
|
||||
*/
|
||||
public Addon getAddon() {
|
||||
return addon;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ public final class AddonsManager {
|
||||
this.loader.add(loader);
|
||||
|
||||
// Get the addon itself
|
||||
addon = loader.addon;
|
||||
addon = loader.getAddon();
|
||||
// Initialize some settings
|
||||
addon.setDataFolder(new File(f.getParent(), addon.getDescription().getName()));
|
||||
addon.setAddonFile(f);
|
||||
|
Loading…
Reference in New Issue
Block a user