本文整理匯總了Java中org.bukkit.entity.Villager.Profession方法的典型用法代碼示例。如果您正苦於以下問題:Java Villager.Profession方法的具體用法?Java Villager.Profession怎麽用?Java Villager.Profession使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.bukkit.entity.Villager
的用法示例。
在下文中一共展示了Villager.Profession方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ds
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
private String ds(Villager.Profession a) {
switch (a) {
case BLACKSMITH:
return "Blacksmith";
case BUTCHER:
return "Butcher";
case FARMER:
return "Farmer";
case HUSK:
return "Husk";
case LIBRARIAN:
return "Librarian";
case NITWIT:
return "Nitwit";
case PRIEST:
return "Priest";
default:
return "Unknown 0x8." + a.ordinal();
}
}
示例2: setVillagerProfession
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
@Override
public void setVillagerProfession(Villager.Profession profession) {
if (profession == null) {
getHandle().clearVillagerType();
} else {
getHandle().setVillagerType(profession.getId());
}
}
示例3: get
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
public static Villager.Profession get(String string) {
return instance()._get(string);
}
示例4: getName
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
public static String getName(Villager.Profession key) {
return instance()._getName(key);
}
示例5: getDisplayName
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
public static String getDisplayName(Villager.Profession key) {
return instance()._getDisplayName(key);
}
示例6: getAliases
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
public static List<String> getAliases(Villager.Profession key) {
return instance()._getAliases(key);
}
示例7: setProfession
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
@Override
public void setProfession(Villager.Profession profession) {
((Villager) getBukkitEntity()).setProfession(profession);
}
示例8: getProfession
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
public Villager.Profession getProfession() {
return profession;
}
示例9: setProfession
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
public void setProfession(Villager.Profession profession) {
this.profession = profession;
if (getNPC().isSpawned()) ((Villager) getNPC().getEntity()).setProfession(profession);
}
示例10: of
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
public static Profession of(Villager.Profession profession) {
return CONVERTER.convert(profession);
}
示例11: getVillagerProfession
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
@Override
public Villager.Profession getVillagerProfession() {
if (!isVillager()) return null;
return Villager.Profession.getProfession(getHandle().getVillagerType());
}
示例12: deni
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
private void deni(Player player){
Map<Villager.Profession,Integer> deniCounts = Castle.getInstance().getDenizenCounts();
for(Villager.Profession p: deniCounts.keySet()){
player.sendMessage(p.toString()+": "+Integer.toString(deniCounts.get(p)));
}
}
示例13: spawnVillager
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
public void spawnVillager(Villager.Profession p) {
Location l = e.getCentre().toLocation();
Villager v = Castle.getInstance().getWorld().spawn(l, Villager.class);
v.setProfession(p);
Castle.getInstance().incDenizenCount(p);
}
示例14: getProfession
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
public Villager.Profession getProfession();
示例15: setProfession
import org.bukkit.entity.Villager; //導入方法依賴的package包/類
public void setProfession(Villager.Profession prof);