mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-24 19:55:17 +01:00
Added ConfigEntry#hidden()
This commit is contained in:
parent
9f676636e0
commit
4a6a109fa4
@ -17,4 +17,10 @@ public @interface ConfigEntry {
|
|||||||
boolean overrideOnChange() default false;
|
boolean overrideOnChange() default false;
|
||||||
boolean experimental() default false;
|
boolean experimental() default false;
|
||||||
boolean needsReset() default false;
|
boolean needsReset() default false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether this config entry should be printed in the final config file or not.
|
||||||
|
* @return {@code true} if this config entry should be printed in the final config file, {@code false} otherwise.
|
||||||
|
*/
|
||||||
|
boolean hidden() default false;
|
||||||
}
|
}
|
@ -341,6 +341,11 @@ public class YamlDatabaseHandler<T> extends AbstractDatabaseHandler<T> {
|
|||||||
if (configEntry != null && !configEntry.path().isEmpty()) {
|
if (configEntry != null && !configEntry.path().isEmpty()) {
|
||||||
storageLocation = configEntry.path();
|
storageLocation = configEntry.path();
|
||||||
experimental = configEntry.experimental();
|
experimental = configEntry.experimental();
|
||||||
|
|
||||||
|
if (configEntry.hidden()) {
|
||||||
|
// If the annotation tells us to not print the config entry, then we won't.
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get path for comments
|
// Get path for comments
|
||||||
|
Loading…
Reference in New Issue
Block a user