Interface Villager

    • Method Detail

      • getProfession

        @NotNull
        Villager.Profession getProfession()
        Gets the current profession of this villager.
        Returns:
        Current profession.
      • setProfession

        void setProfession​(@NotNull
                           Villager.Profession profession)
        Sets the new profession of this villager.
        Parameters:
        profession - New profession.
      • getVillagerType

        @NotNull
        Villager.Type getVillagerType()
        Gets the current type of this villager.
        Returns:
        Current type.
      • setVillagerType

        void setVillagerType​(@NotNull
                             Villager.Type type)
        Sets the new type of this villager.
        Parameters:
        type - New type.
      • getVillagerLevel

        int getVillagerLevel()
        Gets the level of this villager. A villager with a level of 1 and no experience is liable to lose its profession.
        Returns:
        this villager's level
      • setVillagerLevel

        void setVillagerLevel​(int level)
        Sets the level of this villager. A villager with a level of 1 and no experience is liable to lose its profession.
        Parameters:
        level - the new level
        Throws:
        IllegalArgumentException - if level not between [1, 5]
      • getVillagerExperience

        int getVillagerExperience()
        Gets the trading experience of this villager.
        Returns:
        trading experience
      • setVillagerExperience

        void setVillagerExperience​(int experience)
        Sets the trading experience of this villager.
        Parameters:
        experience - new experience
        Throws:
        IllegalArgumentException - if experience < 0