PluginBridge
Class lookup across the classloaders of a hybrid server (Silkard, Youer, ...), reached from MaskingClassLoader's snippet loader once nothing in the host has the name.
Reflective throughout: common links only the JDK and Minecraft, while Bukkit either exists on the game loader at runtime or does not exist at all. The reflective handles are resolved once; the plugin list never is — it is read live per lookup, so enabling, disabling or reloading a plugin needs no invalidation.
There are more loaders than plugins. Two shapes hang one off the side of a plugin loader, both CHILDREN of it, so walking parents misses both: libraryLoader (the plugin's Maven libraries:, a field on the loader) and jar-in-jar (a nested implementation jar extracted at startup, then fed downloaded dependencies at runtime — only the plugin object holds it). collectFieldLoaders finds both by reading each field VALUE and asking which loader defined it. Not the field TYPE: LuckPerms declares its bootstrap field as LoaderBootstrap, so a type-based search finds nothing.
Only loaders the host cannot already reach belong here — this runs last, after masking, the game loader and its parents have all missed. The scan subtracts that chain explicitly, because a plugin loader's JavaPluginLoader field is defined by the server loader: left in, it drags the whole server classpath along behind it.
Types
Functions
The class file behind internalName, or null when no host loader holds it — asked in the order a snippet resolves the class, so what this reads is what would load. MC_LOADER alone is not enough on a plugin host: it is the server loader, the parent of everything plugin-side. Nor is GAME_LOADER a way past it: a Bukkit plugin loader answers getResource from its own jar only, so it gives this mod's classes and neither of the others.
Every loader one field deep from o: per field, the loader that defined its value — or the value itself, when it already is a loader.
Bukkit's own PluginManager covers both plugin families: on Paper the legacy SimplePluginManager forwards getPlugins() to the Paper implementation, whose list holds legacy and Paper plugins alike. null when the game loader has no Bukkit, i.e. not a hybrid server.
The plugin loaders plus whatever hangs off their side, cached against the plugin loaders themselves. getPlugins() is cheap enough per lookup — that is what keeps the list live and invalidation-free — but the field scan is not. Keying on the plugin loader list keeps both: enabling, disabling or reloading a plugin changes that list, misses the cache and rescans on its own.
k's declared fields, or none when they cannot be listed. Listing resolves every field's type through k's loader, so one type that does not load takes the whole table — a soft dependency left uninstalled, or anything not yet loaded once a disabled plugin's loader is closed — while the plugin itself runs on. probing, not a LinkageError catch: that closed loader throws IllegalStateException, and a hybrid's class transformers anything at all. Skipping costs only a loader held in one of those fields; every other class, and every other plugin, is still read.
The same loaders load searches, for PluginJarCollector's compile classpath. The two MUST agree: a name the compiler resolves and the snippet loader then cannot find is a NoClassDefFoundError, strictly worse than the compile error it replaced.