001/* 002 * Trident - A Multithreaded Server Alternative 003 * Copyright 2014 The TridentSDK Team 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018package net.tridentsdk.entity.living; 019 020import net.tridentsdk.entity.types.VillagerCareer; 021import net.tridentsdk.entity.types.VillagerProfession; 022import net.tridentsdk.entity.traits.Ageable; 023import net.tridentsdk.entity.traits.Peaceful; 024import net.tridentsdk.entity.traits.Tradeable; 025 026/** 027 * Represents a Villager 028 * 029 * @author TridentSDK Team 030 */ 031public interface Villager extends Ageable, Tradeable, Peaceful { 032 /** 033 * The profession of this villager 034 * 035 * @return the profession of this villager 036 */ 037 VillagerProfession profession(); 038 039 /** 040 * Sets the profession of this villager. If the current career does not have the profession as its parent, the 041 * current career will be to the first available career 042 */ 043 void setProfession(VillagerProfession profession); 044 045 /** 046 * The career of this villager 047 * 048 * @return the career of this villager 049 */ 050 VillagerCareer career(); 051 052 /** 053 * Sets the career of this villager. If the profession does not match the specified career's parent profession, the 054 * profession will be set the career's parent profession 055 * 056 * @param career the career you want to set for this villager 057 */ 058 void setCareer(VillagerCareer career); 059 060 /** 061 * The current level of this villager's career. Affects trades offered by this villager 062 * 063 * @return the current level of this villager's career 064 */ 065 int careerLevel(); 066}