Hello, I can not apply a potion:
List<PotionEffect> potions = null;
try {
potions = conf.getConfig().getNode("conf", "MagicShield", "Armor", "Helmet").getValue(new TypeToken<List<PotionEffect>>() {});
} catch (ObjectMappingException e) {
e.printStackTrace();
}
if(potions != null) {
if(!player.get(Keys.POTION_EFFECTS).isPresent()) {
player.offer(Keys.POTION_EFFECTS, potions);
}
}
En conf:
[{ContentVersion=2, PotionType=minecraft:night_vision, Duration=6000, Amplifier=0, Ambiance=false, ShowsParticles=false}, {ContentVersion=2, PotionType=minecraft:water_breathing, Duration=6000, Amplifier=0, Ambiance=false, ShowsParticles=false}]