Class ClassSourceValidator

java.lang.Object
com.sk89q.bukkit.util.ClassSourceValidator

public class ClassSourceValidator extends Object
Validates that certain specified classes came from the same source as a plugin.
  • Constructor Details

    • ClassSourceValidator

      public ClassSourceValidator(org.bukkit.plugin.Plugin plugin)
      Create a new instance.
      Parameters:
      plugin - The plugin
  • Method Details

    • findMismatches

      public Map<Class<?>,org.bukkit.plugin.Plugin> findMismatches(List<Class<?>> classes)
      Return a map of classes that been loaded from a different source.
      Parameters:
      classes - A list of classes to check
      Returns:
      The results
    • reportMismatches

      public void reportMismatches(List<Class<?>> classes)
      Reports classes that have come from a different source.

      The warning is emitted to the log.

      Parameters:
      classes - The list of classes to check