CTPerkFunction
Link to ctperkfunction
Importare la Classe
Link to importare-la-classe
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport mods.pmmo.CTPerkFunction;
Metodi
Link to metodi
Name: apply
This function represents the logic being executed for a perk. All perks are provided the player this perk is contextually applicable to, a map of settings and the players current level in the skill associated in the users' config.
Returns: output data. not all events use output data, and your perk may not have anything to return. In this case an empty map is sufficient.
Return Type: MapData
ZenScript CopyCTPerkFunction.apply(player as Player, nbt as MapData, level as int) as MapData
Parametro | Tipo | Descrizione |
---|---|---|
Parametro player | Tipo Player | Descrizione perk executor |
Parametro nbt | Tipo MapData | Descrizione data provided by PMMO |
Parametro level | Tipo int | Descrizione the current level of the player in the skill configured |