CTPerkPredicate
Link to ctperkpredicate
导入类
Link to 导入类
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;
使用方式
Link to 使用方式
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, level as int) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 player | 类型 Player | 描述 perk executor |
参数 nbt | 类型 MapData #地图数据 | 描述 data provided by PMMO |
参数 level | 类型 int | 描述 the current level of the player in the skill configured |