String[] with = {"Spoil", "FestivalSpoil", "Sweeper", "CraftPassive", "CraftDwarven"}; int[][] skills = {{254, 11}, {302, 9}, {42, 1}, {172, 9}, {1321, 1}}; for (int i = 0; i < with.length; i++) { if (actualCommand.startsWith(with[i]) && player.destroyItemByItemId(with[i], 57, 50000, player, true)) { player.addSkill(SkillTable.getInstance().getInfo(skills[i][i], skills[i][i++]), true); player.sendMessage("Вы изучили следующий навык: " + with[i]); } }