forked from RepoMirrors/kami-blue
Fix: Multiple Sprint Modules
Backpoort of cookiedragon234s fix: https://github.com/S-B99/KAMI/pull/46
This commit is contained in:
parent
8542f87f37
commit
66bf207b6a
|
@ -21,6 +21,7 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* Created by 086 on 23/08/2017.
|
||||
* Updated by hub on 3 November 2019
|
||||
*/
|
||||
public class Module {
|
||||
|
||||
|
@ -41,7 +42,10 @@ public class Module {
|
|||
}
|
||||
|
||||
private Info getAnnotation() {
|
||||
return getClass().isAnnotationPresent(Info.class) ? getClass().getAnnotation(Info.class) : Sprint.class.getAnnotation(Info.class); // dummy annotation
|
||||
if (getClass().isAnnotationPresent(Info.class)) {
|
||||
return getClass().getAnnotation(Info.class);
|
||||
}
|
||||
throw new IllegalStateException("No Annotation on class " + this.getClass().getCanonicalName() + "!");
|
||||
}
|
||||
|
||||
public void onUpdate() {}
|
||||
|
|
Loading…
Reference in New Issue