Arbitrary POJO (plain ol' objects) can be validated. Fzzy Config will automatically wrap any object that implements Walkable
, or you can construct validation manually with ValidatedAny
. The validation constructs a "mini-config" around the object; any validation or applicable fields included within the object will be validated just like a proper config. [[Annotations]] relevant to configs like @IgnoreVisibility
work for these objects also.
Heads up!
An object used in this way should have an empty constructor (doesn't have to be the only constructor, one of them should be empty). It's not strictly necessary, but it will help avoid niche issues that might pop up when displaying the object in-game.
See examples of ValidatedAny
at Laying out Configs