Closed Nuckerr closed 2 years ago
Your example is illogical. You cannot get the ban message with getBanMessage()
on the config Object as the method is not present. Did you mean:
public class ExampleClass {
@Getter
@Config("ban-message")
public String banMessage;
}
public class ExamplePlugin extends JavaPlugin {
public void onEnable() {
Yaml config = new Yaml(...);
ExampleClass exampleClass = ExampleClass();
config.annotateClass(exampleClass);
this.getLogger().info(exampleClass.getBanMessage());
}
}
Hey,
Thanks for contributing to SimplixStorage.
This pull request looks promising however you need to revert the "optimize-imports" commit as it does not align with our code style requirements.
Regards, Leonhard
Your example is illogical. You cannot get the ban message with
getBanMessage()
on the config Object as the method is not present. Did you mean:public class ExampleClass { @Getter @Config("ban-message") public String banMessage; }
public class ExamplePlugin extends JavaPlugin { public void onEnable() { Yaml config = new Yaml(...); ExampleClass exampleClass = ExampleClass(); config.annotateClass(exampleClass); this.getLogger().info(exampleClass.getBanMessage()); } }
Yeah, my bad
Thank you so much for this PR. Will have a more detailed look soon but it looks good that we can merge this!
Merged, thanks. We can implement the requested changes later.
Example: