Fully restrict the org.bukkit and net.minecraft namespace
This commit is contained in:
parent
6bbeb93103
commit
4c766c92ac
@ -30,6 +30,9 @@ public class PluginClassLoader extends URLClassLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected Class<?> findClass(String name, boolean checkGlobal) throws ClassNotFoundException {
|
protected Class<?> findClass(String name, boolean checkGlobal) throws ClassNotFoundException {
|
||||||
|
if (name.startsWith("org.bukkit.") || name.startsWith("net.minecraft.")) {
|
||||||
|
throw new ClassNotFoundException(name);
|
||||||
|
}
|
||||||
Class<?> result = classes.get(name);
|
Class<?> result = classes.get(name);
|
||||||
|
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user