0
即使我使用Bukkit,這是一個Java問題;爲什麼構造函數未定義?
我不知道,爲什麼說Java的構造函數是不確定的,因爲它被定義
import org.bukkit.entity.EntityType;
import net.minecraft.server.v1_10_R1.EntityCow;
import net.minecraft.server.v1_10_R1.EntityInsentient;
public enum Pets
{
COW("Cow", 92, EntityType.COW, EntityCow.class, Pets.class);
private String name;
private int id;
private EntityType et;
private Class<? extends EntityInsentient> nmsClass;
private Class<? extends EntityInsentient> customClass;
Pets(String name, int id, EntityType et, Class<? extends EntityInsentient> nmsClass, Class<? extends EntityInsentient> customClass)
{
this.name = name;
this.id = id;
this.et = et;
this.nmsClass = nmsClass;
this.customClass = customClass;
}
public String getName()
{
return name;
}
public int getID()
{
return id;
}
public EntityType getET()
{
return et;
}
public Class<? extends EntityInsentient> getNMSClass()
{
return nmsClass;
}
public Class<? extends EntityInsentient> getCustomClass()
{
return customClass;
}
}
任何想法如何壽解決這個問題,因爲我環顧四周,發現沒有其他比這句法,似乎就像這樣的話題的所有對話至少5歲,非常模糊。