Package me.efekos.simpler
Class Utilities
java.lang.Object
me.efekos.simpler.Utilities
Static class for various utilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckUpdates(org.bukkit.plugin.java.JavaPlugin plugin, int resourceId) Checks versions of the current plugin and the current latest resource at spigotmc.org.getMethodsAnnotatedWith(Class<?> type, Class<? extends Annotation> annotation) Find all theMethods annotated with theAnnotationgiven.
-
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 theMethods annotated with theAnnotationgiven.- Parameters:
type-Classreference of the type you want to search for.annotation-Classreference of tehAnnotationyou want to search in methods.- Returns:
- All the
Methods found.
-