How can I add Code: public BukkitTaskBomb(Main plugin, Entity grenade, int radius) { this.plugin = plugin; this.grenade = grenade; this.radius = radius; } this to make infinity grandes/bombs in config example config: Code: Smallgranade: radius: 5 LargeGranade: radius:10 ... Players add there more. I just can't explain better what I mean:/
@bronzzze so you want the info in the code above to be loaded by the config? or the other way arround?
You could use grenade.getName() or something, add that to the config, then put grenade.getName() + ".radius" + radius
So like this Code: public BukkitTaskBomb(Main plugin, Entity grenade, int radius, String name) { and then Code: new BukkitTaskBomb(main, smallbitem, main.getConfig.getInt(2), smallbitem.getName()).runTaskLater(main, 20 * 2); @mine-care I want that player that uses this plugin add in config custom Granade with custom radius and display name. Edit: How to get entity Display name. granade.getName() not working Another Edit: Oh I could just make New ItemStack and set It display name in config right? Code: ItemStack small = new ItemStack(Material.SLIME_BALL); ItemMeta smallM = small.getItemMeta(); smallM.setDisplayName(main.getConfig().getString("GranadeDisplayName")); small.setItemMeta(smallM);