geforkt von Mirrors/Paper
Implemented Villager API for getting/setting Profession. This adds BUKKIT-887
Dieser Commit ist enthalten in:
Ursprung
20c8ae59fc
Commit
ec35500c63
@ -1,7 +1,7 @@
|
||||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import net.minecraft.server.EntityVillager;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Villager;
|
||||
@ -24,4 +24,13 @@ public class CraftVillager extends CraftCreature implements Villager {
|
||||
public EntityType getType() {
|
||||
return EntityType.VILLAGER;
|
||||
}
|
||||
|
||||
public Profession getProfession() {
|
||||
return Profession.getProfession(getHandle().getProfession());
|
||||
}
|
||||
|
||||
public void setProfession(Profession profession) {
|
||||
Validate.notNull(profession);
|
||||
getHandle().setProfession(profession.getId());
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren