Docs » API reference » Professions

Professions

A player's twelve professions: experience and levels.

A handle to something in the game. Once that thing is gone, its calls fail with Gone. You get one from player.professions().

Methods

MethodDescription
fn level(&self, profession: Profession) -> Result<i64>long level(Profession profession)Their level in it.
fn experience(&self, profession: Profession) -> Result<i64>long experience(Profession profession)Their experience in it.
fn add_experience(&self, profession: Profession, amount: i64) -> Result<()>void addExperience(Profession profession, long amount) player_dataGives experience (it may level them up).

Profession

One of the twelve professions.

One of a fixed set of values.

ValueMeaning
Profession::MiningProfession.MININGMining.
Profession::WoodcuttingProfession.WOODCUTTINGWoodcutting.
Profession::FarmingProfession.FARMINGFarming.
Profession::FishingProfession.FISHINGFishing.
Profession::ForagingProfession.FORAGINGForaging.
Profession::ExcavationProfession.EXCAVATIONDigging.
Profession::CookingProfession.COOKINGCooking.
Profession::BlacksmithingProfession.BLACKSMITHINGForge and anvil.
Profession::CarpentryProfession.CARPENTRYThe workbench.
Profession::AlchemyProfession.ALCHEMYThe cauldron.
Profession::RanchingProfession.RANCHINGRanching.
Profession::TamingProfession.TAMINGCatching Voxelmon.

Events

Related events: ProfessionLevelledUp.