Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //problem: setValue(TypeToken, Object) throws ObjectMappingException
- super(key, HoconConfigurationLoader.builder().build().createEmptyNode().setValue(TypeToken.of(ItemStack.class), mergeWith))
- //solution:
- super(key, ((Supplier<ConfigurationNode>) () -> {try {return HoconConfigurationLoader.builder().build().createEmptyNode().setValue(TypeToken.of(ItemStack.class), mergeWith);} catch (ObjectMappingException e) {throw new IllegalArgumentException();}}).get());
Advertisement
Add Comment
Please, Sign In to add comment