Class LogScanner

java.lang.Object
org.polyfrost.oneconfig.utils.v1.LogScanner

public final class LogScanner extends Object
Adapted from NotEnoughCrashes under the MIT License
  • Method Details

    • identifyFromStacktrace

      @NotNull public static @NotNull Set<org.polyfrost.oneconfig.api.platform.v1.ModInfo> identifyFromStacktrace(Throwable e)
      Return a set of ActiveMods that have been blamed for the given stacktrace

      This will be an empty set if no mods are blamed

      Parameters:
      e - The throwable to scan
      Returns:
      A set of mods that are blamed for the given stacktrace
    • identifyCallerFromStacktrace

      @NotNull public static @NotNull Set<org.polyfrost.oneconfig.api.platform.v1.ModInfo> identifyCallerFromStacktrace(Throwable e)
      Attempt to get the caller from a given stacktrace
      Returns:
      A singleton mod set that contains the caller or an empty set if no caller is found
    • identifyFromClass

      public static Set<org.polyfrost.oneconfig.api.platform.v1.ModInfo> identifyFromClass(String className)
    • identifyFromClass

      @NotNull public static @NotNull Set<org.polyfrost.oneconfig.api.platform.v1.ModInfo> identifyFromClass(Class<?> clazz)
      Return a set of ActiveMods that have been associated with the given class
      Parameters:
      clazz - The class to scan
      Returns:
      A set of mods that are associated with the given class