Class DynamicAbilityClassLoader

java.lang.Object
java.lang.ClassLoader
valorless.rarespawns.compilers.DynamicAbilityClassLoader

public class DynamicAbilityClassLoader extends ClassLoader
Dynamic class loader for RareSpawns abilities.

This loader attempts to resolve classes from the plugin's data folder at runtime, specifically from: {pluginDataFolder}/abilities/compiled/. It expects a compiled .class file whose filename matches the provided class name (without package) and defines the class with that name.

Typical use is to hot‑load custom ability implementations that were compiled outside the main plugin JAR. The parent class loader (usually the plugin class loader) is preserved so that standard and plugin classes are still available.

Since:
1.0
  • Constructor Details

    • DynamicAbilityClassLoader

      public DynamicAbilityClassLoader(ClassLoader parent)
      Creates a new dynamic class loader that delegates to the given parent.
      Parameters:
      parent - the parent class loader to delegate to for standard lookups
  • Method Details