Hi, i got a problem. I have engine variable and i need to write it to ArrayList but i dont know what type off array i need to use? Code: Locomotiva engine = new Locomotiva(trem, eletrica, v, this.plugin); this.plugin.getLocomotivas().add(engine); Crashes on .add(); Engine contains - (CommandSender, Command, String, String[]). How to?
The type List is not generic; it cannot be parameterized with arguments <Locomotiva> New errors Code: List<Locomotiva>engine = new ArrayList<Locomotiva>(); this.plugin.getLocomotivas().[B]add[/B](engine);//error if(eletrica) { sender.sendMessage("Created electric locomotive with " + engine.[B]getPotencia[/B]() + "HP of power\n" + "and " + engine.[B]getConsumo[/B]() + "HP of electric power consumption.\n" + "Designed to run in " + engine.[B]getVoltagem[/B]() + "V lines, rain or shine!" + "\nBe happy!"); } else { sender.sendMessage("Created lava locomotive with " + engine.[B]getPotencia[/B]() + "HP of power\nand " + engine.[B]getCapacidadeCombustivel[/B]() + " of fuel capacity.\nBe happy!"); } return true; } return false; } with bold i marked errors functtions EDIT by Moderator: merged posts, please use the edit button instead of double posting.