超神的冰凉
如题,问题是nukkit的entity的isplayer是protected属性,无法直接访问。

Kenneth_z
本帖最后由 Kenneth_z 于 2020-1-21 17:58 编辑

用类型判断就行 isPlayer是核心用的

  1. if(entity instanceof Player){
  2.     Player player = (Player)entity;
  3.     ...
  4. }
复制代码



第一页 上一页 下一页 最后一页