我对编码很新,我不断收到这个错误,我真的需要帮助.这是我的代码:
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){
if (stack.getItem() == halo.TitaniumHelmet || stack.getItem() == halo.TitaniumChestplate || stack.getItem() == halo.TitaniumBoots) {
return "halo:textures/models/armor/Titanium1.png";
}
if (stack.getItem() == halo.TitaniumLeggings); {
return "halo:textures/models/armor/Titanium_layar_2.png";
} else { //<------ Syntax error on token "else", delete this token
return null;
}
Run Code Online (Sandbox Code Playgroud)