Remove Core.getVersion calls

This commit is contained in:
2026-05-16 14:02:57 +02:00
parent ab3970981d
commit ce1f947f4b
45 changed files with 123 additions and 378 deletions
@@ -71,9 +71,6 @@ public abstract class AbstractLinker<T> {
try {
classes.forEach(clazz -> {
MinVersion minVersion = clazz.getAnnotation(MinVersion.class);
MaxVersion maxVersion = clazz.getAnnotation(MaxVersion.class);
if (!versionCheck(clazz, minVersion, maxVersion)) return;
EventMode eventMode = clazz.getAnnotation(EventMode.class);
if (!eventModeCheck(clazz, eventMode)) return;
PluginCheck[] pluginChecks = clazz.getAnnotationsByType(PluginCheck.class);
@@ -135,13 +132,6 @@ public abstract class AbstractLinker<T> {
instances.put(instance.getClass(), instance);
}
/**
* @return {@code true} if the clazz passes the checks {@code false} otherwise
*/
protected boolean versionCheck(@NonNull Class<?> clazz, MinVersion minVersion, MaxVersion maxVersion) {
return true;
}
/**
* @return {@code true} if the clazz passes the checks {@code false} otherwise
*/
@@ -26,6 +26,7 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Deprecated
public @interface MaxVersion {
int value();
}
@@ -26,6 +26,7 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Deprecated
public @interface MinVersion {
int value();
}