本文整理汇总了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);