Allow settings biomes and added configurable professions
This commit is contained in:
parent
41afbfea39
commit
abbb46e1e8
|
|
@ -1,5 +1,6 @@
|
|||
package com.alttd.objects;
|
||||
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
|
@ -28,13 +29,15 @@ public class VillagerType {
|
|||
private final Set<ItemStack> buying;
|
||||
private final Set<ItemStack> selling;
|
||||
private final double priceModifier;
|
||||
private final Villager.Profession profession;
|
||||
|
||||
public VillagerType(String name, String displayName, Set<ItemStack> buying, Set<ItemStack> selling, double priceModifier) {
|
||||
public VillagerType(String name, String displayName, Set<ItemStack> buying, Set<ItemStack> selling, double priceModifier, String profession) {
|
||||
this.name = name;
|
||||
this.displayName = displayName;
|
||||
this.buying = buying;
|
||||
this.selling = selling;
|
||||
this.priceModifier = priceModifier;
|
||||
this.profession = Villager.Profession.valueOf(profession.toUpperCase());
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
|
@ -57,6 +60,10 @@ public class VillagerType {
|
|||
return priceModifier;
|
||||
}
|
||||
|
||||
public Villager.Profession getProfession() {
|
||||
return profession;
|
||||
}
|
||||
|
||||
public String getPermission() {
|
||||
return "villagerui.villager." + getName();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user