Class Utilities

java.lang.Object
me.efekos.simpler.Utilities

public class Utilities extends Object
Static class for various utilities.
  • Constructor Details

    • Utilities

      public Utilities()
      Creates a new instance if you somehow need one.
  • Method Details

    • checkUpdates

      public static boolean checkUpdates(org.bukkit.plugin.java.JavaPlugin plugin, int resourceId)
      Checks versions of the current plugin and the current latest resource at spigotmc.org.
      Parameters:
      plugin - An instance of your plugin.
      resourceId - Resource id of your spigot resource.
      Returns:
      true if the current plugin's version and the latest version is same. false if not.
    • getMethodsAnnotatedWith

      public static List<Method> getMethodsAnnotatedWith(Class<?> type, Class<? extends Annotation> annotation)
      Find all the Methods annotated with the Annotation given.
      Parameters:
      type - Class reference of the type you want to search for.
      annotation - Class reference of teh Annotation you want to search in methods.
      Returns:
      All the Methods found.