diff --git a/tweed5-minecraft/coat-bridge/src/testmod/java/de/siphalor/tweed5/coat/bridge/testmod/TweedCoatBridgeTestModConfig.java b/tweed5-minecraft/coat-bridge/src/testmod/java/de/siphalor/tweed5/coat/bridge/testmod/TweedCoatBridgeTestModConfig.java index 30d7452..bfea9bb 100644 --- a/tweed5-minecraft/coat-bridge/src/testmod/java/de/siphalor/tweed5/coat/bridge/testmod/TweedCoatBridgeTestModConfig.java +++ b/tweed5-minecraft/coat-bridge/src/testmod/java/de/siphalor/tweed5/coat/bridge/testmod/TweedCoatBridgeTestModConfig.java @@ -20,9 +20,9 @@ public class TweedCoatBridgeTestModConfig { @Validator(value = WeavableNumberRangeValidator.class, config = "-10=..=10") private int integerInRange = -5; - @Attribute(key = TweedCoatAttributes.BACKGROUND_TEXTURE, values = "textures/block/green_terracotta.png") + @Attribute(key = TweedCoatAttributes.BACKGROUND_TEXTURE, value = "textures/block/green_terracotta.png") private Greeting serverGreeting = new Greeting("Hello server!", "Server"); - @Attribute(key = TweedCoatAttributes.BACKGROUND_TEXTURE, values = "textures/block/red_terracotta.png") + @Attribute(key = TweedCoatAttributes.BACKGROUND_TEXTURE, value = "textures/block/red_terracotta.png") private Greeting clientGreeting = new Greeting("Hello client!", "Client"); @CompoundWeaving diff --git a/tweed5-minecraft/fabric-helper/src/testmod/java/de/siphalor/tweed5/fabric/helper/testmod/TestModConfig.java b/tweed5-minecraft/fabric-helper/src/testmod/java/de/siphalor/tweed5/fabric/helper/testmod/TestModConfig.java index a932e96..6d5b871 100644 --- a/tweed5-minecraft/fabric-helper/src/testmod/java/de/siphalor/tweed5/fabric/helper/testmod/TestModConfig.java +++ b/tweed5-minecraft/fabric-helper/src/testmod/java/de/siphalor/tweed5/fabric/helper/testmod/TestModConfig.java @@ -13,7 +13,7 @@ import lombok.Data; @Data public class TestModConfig { private String helloStart = "Minecraft"; - @Attribute(key = "scope", values = "game") + @Attribute(key = "scope", value = "game") private String helloInGame = "Game"; private String helloEnd = "!"; } diff --git a/tweed5/weaver-pojo-attributes-extension/src/main/java/de/siphalor/tweed5/weaver/pojoext/attributes/api/Attribute.java b/tweed5/weaver-pojo-attributes-extension/src/main/java/de/siphalor/tweed5/weaver/pojoext/attributes/api/Attribute.java index de4b20e..986ed20 100644 --- a/tweed5/weaver-pojo-attributes-extension/src/main/java/de/siphalor/tweed5/weaver/pojoext/attributes/api/Attribute.java +++ b/tweed5/weaver-pojo-attributes-extension/src/main/java/de/siphalor/tweed5/weaver/pojoext/attributes/api/Attribute.java @@ -11,5 +11,5 @@ import java.lang.annotation.*; @Repeatable(Attributes.class) public @interface Attribute { String key(); - String[] values(); + String[] value(); } diff --git a/tweed5/weaver-pojo-attributes-extension/src/main/java/de/siphalor/tweed5/weaver/pojoext/attributes/api/AttributesPojoWeavingProcessor.java b/tweed5/weaver-pojo-attributes-extension/src/main/java/de/siphalor/tweed5/weaver/pojoext/attributes/api/AttributesPojoWeavingProcessor.java index ae1e4e5..0e697f7 100644 --- a/tweed5/weaver-pojo-attributes-extension/src/main/java/de/siphalor/tweed5/weaver/pojoext/attributes/api/AttributesPojoWeavingProcessor.java +++ b/tweed5/weaver-pojo-attributes-extension/src/main/java/de/siphalor/tweed5/weaver/pojoext/attributes/api/AttributesPojoWeavingProcessor.java @@ -32,7 +32,7 @@ public class AttributesPojoWeavingProcessor implements TweedPojoWeavingExtension @Override public void afterWeaveEntry(ActualType valueType, ConfigEntry configEntry, WeavingContext context) { val attributeAnnotations = context.annotations().getAnnotationsByType(Attribute.class); - val attributes = collectAttributesFromAnnotations(attributeAnnotations, Attribute::key, Attribute::values); + val attributes = collectAttributesFromAnnotations(attributeAnnotations, Attribute::key, Attribute::value); attributes.forEach((key, values) -> attributesExtension.setAttribute(configEntry, key, values)); val attributeDefaultAnnotations = context.annotations().getAnnotationsByType(AttributeDefault.class); diff --git a/tweed5/weaver-pojo-attributes-extension/src/test/java/de/siphalor/tweed5/weaver/pojoext/attributes/api/AttributesPojoWeavingProcessorTest.java b/tweed5/weaver-pojo-attributes-extension/src/test/java/de/siphalor/tweed5/weaver/pojoext/attributes/api/AttributesPojoWeavingProcessorTest.java index 5a3e2a2..8647d97 100644 --- a/tweed5/weaver-pojo-attributes-extension/src/test/java/de/siphalor/tweed5/weaver/pojoext/attributes/api/AttributesPojoWeavingProcessorTest.java +++ b/tweed5/weaver-pojo-attributes-extension/src/test/java/de/siphalor/tweed5/weaver/pojoext/attributes/api/AttributesPojoWeavingProcessorTest.java @@ -72,19 +72,19 @@ class AttributesPojoWeavingProcessorTest { @PojoWeavingExtension(AttributesPojoWeavingProcessor.class) @CompoundWeaving public static class Config { - @Attribute(key = "scope", values = "game") + @Attribute(key = "scope", value = "game") public String string; - @Attribute(key = "color", values = "green") + @Attribute(key = "color", value = "green") public SubConfig sub1; @AttributeDefault(key = "color", defaultValue = "green") @AttributeDefault(key = "scope", defaultValue = "game") - @Attribute(key = "scope", values = "world") + @Attribute(key = "scope", value = "world") public SubConfig sub2; } @CompoundWeaving public static class SubConfig { - @Attribute(key = "color", values = "red") + @Attribute(key = "color", value = "red") public String a; public String b; }