Code: @EventHandler public void EXP(BlockBreakEvent e) { Player p = e.getPlayer(); Block b = e.getBlock(); if(b.getType() == Material.COBBLESTONE) { p.giveExp(plugin.getConfig().getString("EXPCobblestone")); } } In here it won't let me get the config. Iit gives me a red line under giveExp. I can't think of a way I can do valueOf in an int, but if there is any way I can get a config from there can you please tell me.
Assuming you've already created an instance of the plugin to retrieve the config, you can either use Integer.valueOf(string) or plugin.getConfig().getInt("path")
Use Integer.parseInt(String) or what @ArticleZero said. EDIT: Seeing that you're using EXP, you're probably going to use Short.parseShort(String), which, I am not sure if that exists, or just cast the int to a short.