如题,问题是nukkit的entity的isplayer是protected属性,无法直接访问。
本帖最后由 Kenneth_z 于 2020-1-21 17:58 编辑
用类型判断就行 isPlayer是核心用的
复制代码
用类型判断就行 isPlayer是核心用的
- if(entity instanceof Player){
- Player player = (Player)entity;
- ...
- }