sponge api8
This commit is contained in:
parent
66f4ba911f
commit
56b8eaa9a7
|
|
@ -11,6 +11,12 @@ class TabooLibClassVisitor extends ClassVisitor {
|
||||||
Project project
|
Project project
|
||||||
Map<String, List<String>> isolated = new HashMap()
|
Map<String, List<String>> isolated = new HashMap()
|
||||||
|
|
||||||
|
List<String> annotations = [
|
||||||
|
"Lorg/spongepowered/api/plugin/Plugin;",
|
||||||
|
"Lorg/spongepowered/plugin/jvm/Plugin;",
|
||||||
|
"Lcom/velocitypowered/api/plugin/Plugin;"
|
||||||
|
]
|
||||||
|
|
||||||
TabooLibClassVisitor(ClassVisitor classVisitor, Project project) {
|
TabooLibClassVisitor(ClassVisitor classVisitor, Project project) {
|
||||||
super(Opcodes.ASM7, classVisitor);
|
super(Opcodes.ASM7, classVisitor);
|
||||||
this.project = project
|
this.project = project
|
||||||
|
|
@ -26,7 +32,7 @@ class TabooLibClassVisitor extends ClassVisitor {
|
||||||
AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
|
AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
|
||||||
if (descriptor == "L${project.group.replace('.', '/')}/taboolib/common/Isolated;") {
|
if (descriptor == "L${project.group.replace('.', '/')}/taboolib/common/Isolated;") {
|
||||||
return new IsolatedAnnotationVisitor(super.visitAnnotation(descriptor, visible), project, name, this)
|
return new IsolatedAnnotationVisitor(super.visitAnnotation(descriptor, visible), project, name, this)
|
||||||
} else if (descriptor == "Lorg/spongepowered/api/plugin/Plugin;" || descriptor == "Lcom/velocitypowered/api/plugin/Plugin;") {
|
} else if (descriptor in annotations) {
|
||||||
return new PluginAnnotationVisitor(super.visitAnnotation(descriptor, visible), project)
|
return new PluginAnnotationVisitor(super.visitAnnotation(descriptor, visible), project)
|
||||||
} else {
|
} else {
|
||||||
return super.visitAnnotation(descriptor, visible)
|
return super.visitAnnotation(descriptor, visible)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue