Class CraftBukkitFinder

java.lang.Object
me.ryun.plugintools.CraftBukkitFinder

public class CraftBukkitFinder extends Object
A class that scans the package names for an available CraftBukkit version with backward and forward compatibility
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The package name before the different version names starts
    static final int
    The maximum major version which is the first number
    static final int
    The minimum major version which is the first number
    static final int
    The maximum minor version which is the second number
    static final int
    The minimum minor version which is the second number
    static final int
    The final number preceded by an R which is short for "Revision".
    static final String
    The Class to be tested to exist to check if the package name exists
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    scan(boolean isLogging)
    Scans the package names for a working classpath by testing it with a known available class

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • baseClassPath

      public static final String baseClassPath
      The package name before the different version names starts
      See Also:
    • testClassName

      public static final String testClassName
      The Class to be tested to exist to check if the package name exists
      See Also:
    • MAJOR_MINIMUM

      public static final int MAJOR_MINIMUM
      The minimum major version which is the first number
      See Also:
    • MAJOR_MAXIMUM

      public static final int MAJOR_MAXIMUM
      The maximum major version which is the first number
      See Also:
    • MINOR_MINIMUM

      public static final int MINOR_MINIMUM
      The minimum minor version which is the second number
      See Also:
    • MINOR_MAXIMUM

      public static final int MINOR_MAXIMUM
      The maximum minor version which is the second number
      See Also:
    • REVISION_MAXIMUM

      public static final int REVISION_MAXIMUM
      The final number preceded by an R which is short for "Revision". Note that all Revisions starts from 1, so we don't need to specify
      See Also:
  • Constructor Details

    • CraftBukkitFinder

      public CraftBukkitFinder()
  • Method Details

    • scan

      public static String scan(boolean isLogging)
      Scans the package names for a working classpath by testing it with a known available class
      Parameters:
      isLogging - If the scan will log if it found a working version or not for each try
      Returns:
      The package name i.e. org.bukkit.craftbukkit.v1_20_R1