if i had a config with an area to set an itemtype how would i execute that in the code: example Code (Text): ItemStack addon1 = new ItemStack(Material.POTION); where i have "Material.POTION" how can i grab the material from config? i also need to do the same with potion effect types
You should be able to find that one yourself. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
i got it all working except this; Code (Text): player.addPotionEffect(new PotionEffect(PotionEffectType.getByName(getConfig().getString("Addon1.PotionType"), getConfig().getInt("Addon1.Duration")*20, 1))); "getByName" is underlined red
You are supposed to wait 24 hours before bumping. You waited 6 minutes. Your parenthesis is in the wrong place.
There should be a parenthesis after the 109th character in this line of code. Code (Text): player.addPotionEffect(new PotionEffect(PotionEffectType.getByName(getConfig().getString("Addon1.PotionType"), getConfig().getInt("Addon1.Duration")*20, 1))); This new parenthesis should replace the 157th character. Specific enough?
i just counted again and it lands in the same spot: The Line: Code (Text): player.addPotionEffect(PotionEffectType.getByName(getConfig().getString("Addon1.PotionType"), this.getConfig().getInt("Addon1.Duration")*20, 1)); I'm lost here...
ok i have changed it to this but now addPotionEffect is underlined saying "LivingEntity is not applicable for the arguments" Code (Text): player.addPotionEffect(PotionEffectType.getByName(getConfig().getString("Addon1.PotionType")), this.getConfig().getInt("Addon1.Duration")*20, 1);