update to latest CitizensAPI

This commit is contained in:
aPunch 2012-03-08 15:30:05 -06:00
parent 3485f651b1
commit fde15d4abd
3 changed files with 4 additions and 4 deletions

Binary file not shown.

View File

@ -16,11 +16,9 @@ import org.bukkit.inventory.ItemStack;
import net.apunch.blacksmith.util.Settings.Setting; import net.apunch.blacksmith.util.Settings.Setting;
import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.trait.Character; import net.citizensnpcs.api.npc.character.Character;
import net.citizensnpcs.api.trait.SaveId;
import net.citizensnpcs.api.util.DataKey; import net.citizensnpcs.api.util.DataKey;
@SaveId("blacksmith")
public class Blacksmith extends Character { public class Blacksmith extends Character {
private static final int[] enchantments = new int[Enchantment.values().length]; private static final int[] enchantments = new int[Enchantment.values().length];

View File

@ -6,6 +6,7 @@ import net.apunch.blacksmith.util.Settings;
import net.apunch.blacksmith.util.Settings.Setting; import net.apunch.blacksmith.util.Settings.Setting;
import net.citizensnpcs.api.CitizensAPI; import net.citizensnpcs.api.CitizensAPI;
import net.citizensnpcs.api.npc.character.CharacterFactory;
import net.citizensnpcs.api.util.DataKey; import net.citizensnpcs.api.util.DataKey;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.Economy;
@ -37,7 +38,8 @@ public class BlacksmithPlugin extends JavaPlugin {
if (economyProvider != null) if (economyProvider != null)
economy = economyProvider.getProvider(); economy = economyProvider.getProvider();
CitizensAPI.getCharacterManager().register(Blacksmith.class); CitizensAPI.getCharacterManager().registerCharacter(
new CharacterFactory(Blacksmith.class).withName("blacksmith"));
getLogger().log(Level.INFO, " v" + getDescription().getVersion() + " enabled."); getLogger().log(Level.INFO, " v" + getDescription().getVersion() + " enabled.");
} }