mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-26 12:46:01 +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 {
|
public class AddonClassLoader extends URLClassLoader {
|
||||||
|
|
||||||
private final Map<String, Class<?>> classes = new HashMap<String, Class<?>>();
|
private final Map<String, Class<?>> classes = new HashMap<String, Class<?>>();
|
||||||
public Addon addon;
|
private Addon addon;
|
||||||
private AddonsManager loader;
|
private AddonsManager loader;
|
||||||
|
|
||||||
public AddonClassLoader(AddonsManager addonsManager, Map<String, String>data, File path, BufferedReader reader, ClassLoader parent)
|
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 result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the addon
|
||||||
|
*/
|
||||||
|
public Addon getAddon() {
|
||||||
|
return addon;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ public final class AddonsManager {
|
|||||||
this.loader.add(loader);
|
this.loader.add(loader);
|
||||||
|
|
||||||
// Get the addon itself
|
// Get the addon itself
|
||||||
addon = loader.addon;
|
addon = loader.getAddon();
|
||||||
// Initialize some settings
|
// Initialize some settings
|
||||||
addon.setDataFolder(new File(f.getParent(), addon.getDescription().getName()));
|
addon.setDataFolder(new File(f.getParent(), addon.getDescription().getName()));
|
||||||
addon.setAddonFile(f);
|
addon.setAddonFile(f);
|
||||||
|
Loading…
Reference in New Issue
Block a user