CTPerkPredicate
Link to ctperkpredicate
Importing the class
Link to importing-the-class
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.CTPerkPredicate;
Methods
Link to methods
Name: test
PMMO checks certain default conditions such as level requirements, and chance. If you have other conditions by which this perk should activate, such as a specific dimension, this is where you perform that check. Returning true indicates the requirements were met.
Returns: if the perk is permitted to execute
Return Type: boolean
ZenScript CopyCTPerkPredicate.test(player as Player, nbt as MapData) as boolean
Parameter | Type | Description |
---|---|---|
Parameter player | Type Player | Description perk executor |
Parameter nbt | Type MapData | Description data provided by PMMO |