mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 18:22:08 -07:00
Fully restrict the org.bukkit and net.minecraft namespace
By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
@@ -30,6 +30,9 @@ public class PluginClassLoader extends URLClassLoader {
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
if (result == null) {
|
||||
|
Reference in New Issue
Block a user