Package me.efekos.simpler
Class Utilities
java.lang.Object
me.efekos.simpler.Utilities
Static class for various utilities.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkUpdates
(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 theMethod
s annotated with theAnnotation
given.
-
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 theMethod
s annotated with theAnnotation
given.- Parameters:
type
-Class
reference of the type you want to search for.annotation
-Class
reference of tehAnnotation
you want to search in methods.- Returns:
- All the
Method
s found.
-