Comments (4)
Źle używasz double brace initialisation. To nigdy nie miało prawo działać, nie widzę takiej opcji nawet poza configami. Zamiast flags.put
powinno być this.put
.
from okaeri-configs.
Prawdopodobnie próbujesz wrzucić nulla do configu - to nie przejdzie. Wrzucaj zamiast tego pustą mapę, jeżeli nie chcesz żadnych danych. A jeżeli to nie to to przydałby się kod.
from okaeri-configs.
Zdecydowanie wygląda to na problem samego sposobu inicjalizacji. Przydałoby się, zamiast samych stacktrace wrzucać też klasę configu i sposób ładowania jak robisz zgłoszenia.
from okaeri-configs.
Sorki zapomniałem :(
@Comment("[#] Konfigurowanie flag.")
Map<FlagType, Flag> flags = new HashMap<>() {{
flags.put(FlagType.BUILD, new Flag("Budowanie", "Możliwość budowania bloków.", false, true));
flags.put(FlagType.DESTROY, new Flag("Niszczenie", "Możliwość niszczenia bloków.", false, true));
flags.put(FlagType.CHEST, new Flag("Otwieranie skrzynek", "Możliwość otwierania skrzyń.", true, true));
}};
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
public class Flag extends OkaeriConfig {
@Comment("[#] Wyświetlana nazwa flagi.")
private String displayName;
@Comment("[#] Opis flagi.")
private String description;
@Comment("[#] Możliwość zmiany flagi.")
private boolean configurable;
@Comment("[#] Czy flaga powinna być domyślną.")
private boolean defaultFlag;
}
from okaeri-configs.
Related Issues (20)
- Nested Object Serialization HOT 1
- No comments for all options HOT 3
- Not compatible with Java 17 HOT 5
- JSON Gson configs do not encode special characters HOT 3
- Null value after config update HOT 7
- Newly added variables are not in the proper order HOT 4
- Deserialization of Map<MyEnum, List<MyOkaeriConfig>> results in Map<MyEnum, List<LinkedHashMap>> HOT 2
- Orphaned keys not removed after save HOT 1
- Empty string is added each time the configuration is loaded. HOT 4
- Subconfigurations validation seem to be not implemented HOT 1
- Comments inside subconfigs from collections and maps don't work HOT 1
- Itemstack serializer do not serialize a color HOT 1
- Extend serdes-bukkit's ItemStackSerializer with support for complex items
- Give access to root object in serializer HOT 5
- Add TOML support HOT 4
- YamlSnakeYamlConfigurer isn't compatible with latest versions of snakeyaml
- Minestom (Community Edition) platform HOT 2
- Add friendly exception messages for errors
- failed to #getValue for crates and Cannot cast me.paradis.smashcratess.crates.actions.MessageAction to java.util.List HOT 3
- Support for `.properties` file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from okaeri-configs.