/// <summary> /// 查询在线玩家基本信息 /// </summary> /// <param name="uuid">在线玩家的uuid字符串</param> /// <returns>玩家基本信息json字符串</returns> public string selectPlayer(string uuid) { try { return (cselectPlayer != null) ? StrTool.c_str(cselectPlayer(uuid)) : string.Empty; } catch (Exception e) { Console.WriteLine(e); } return string.Empty; }
/// <summary> /// 获取玩家权限与游戏模式<br/> /// 注:OP命令等级包含6个有效等级[op-permission-level],权限包含3种有效权限[permissions.json],游戏模式包含5种有效模式[gamemode] /// </summary> /// <param name="uuid">在线玩家的uuid字符串</param> /// <returns>权限与模式的json字符串</returns> public string getPlayerPermissionAndGametype(string uuid) { try { return (cgetPlayerPermissionAndGametype != null) ? StrTool.c_str(cgetPlayerPermissionAndGametype(uuid)) : string.Empty; } catch (Exception e) { Console.WriteLine(e.StackTrace); } return string.Empty; }
/// <summary> /// 获取玩家所有效果列表 /// </summary> /// <param name="uuid">在线玩家的uuid字符串</param> /// <returns>效果列表json字符串</returns> public string getPlayerEffects(string uuid) { try { return (cgetPlayerEffects != null) ? StrTool.c_str(cgetPlayerEffects(uuid)) : string.Empty; } catch (Exception e) { Console.WriteLine(e.StackTrace); } return string.Empty; }
/// <summary> /// 获取一个结构 /// </summary> /// <param name="did">地图维度</param> /// <param name="jsonposa">坐标JSON字符串</param> /// <param name="jsonposb">坐标JSON字符串</param> /// <param name="exent">是否导出实体</param> /// <param name="exblk">是否导出方块</param> /// <returns>结构json字符串</returns> public string getStructure(int did, string jsonposa, string jsonposb, bool exent, bool exblk) { try { return (cgetStructure != null) ? StrTool.c_str(cgetStructure(did, jsonposa, jsonposb, exent, exblk)) : string.Empty; }catch (Exception e) { Console.WriteLine(e.StackTrace); } return string.Empty; }
/// <summary> /// 获取在线玩家列表 /// </summary> /// <returns></returns> public string getOnLinePlayers() { try { return (cgetOnLinePlayers != null) ? StrTool.c_str(cgetOnLinePlayers()) : string.Empty; } catch(Exception e) { Console.WriteLine(e.StackTrace); } return string.Empty; }
/// <summary> /// 获取玩家当前选中项信息<br/> /// 注:选中项包含选中框所处位置,以及选中物品的nbt描述型数据 /// </summary> /// <param name="uuid">在线玩家的uuid字符串</param> /// <returns>当前选中项信息json字符串</returns> public string getPlayerSelectedItem(string uuid) { try { return((cgetPlayerSelectedItem != null) ? StrTool.c_str(cgetPlayerSelectedItem(uuid)) : string.Empty); } catch (Exception e) { Console.WriteLine(e.StackTrace); } return(string.Empty); }
/// <summary> /// 获取玩家属性上限值表 /// </summary> /// <param name="uuid">在线玩家的uuid字符串</param> /// <returns>属性上限值json字符串</returns> public string getPlayerMaxAttributes(string uuid) { try { return((cgetPlayerMaxAttributes != null) ? StrTool.c_str(cgetPlayerMaxAttributes(uuid)) : string.Empty); } catch (Exception e) { Console.WriteLine(e.StackTrace); } return(string.Empty); }
/// <summary> /// 获取名字 /// </summary> /// <returns></returns> public string getName() { if (ptr != null && ptr != IntPtr.Zero) { Std_String s = egetName(ptr); return(StrTool.c_str(s)); } return(null); }
/// <summary> /// 获取所有计分板计分项 /// </summary> /// <returns>计分板json字符串</returns> public string getAllScore() { try { return((cgetAllScore != null) ? StrTool.c_str(cgetAllScore()) : string.Empty); } catch (Exception e) { Console.WriteLine(e.StackTrace); } return(string.Empty); }
/// <summary> /// 获取一个指定位置处区块的颜色数据<br/> /// 注:如区块未处于活动状态,可能返回无效颜色数据 /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="z"></param> /// <param name="did">待读取的维度</param> /// <returns>区块位置及颜色数据内容</returns> public string getMapColors(int x, int y, int z, int did) { return((cgetMapColors != null) ? StrTool.c_str(cgetMapColors(x, y, z, did)) : string.Empty); }
/// <summary> /// 导出地图所有离线玩家数据<br/> /// 注:调用时机在地图初始化完成之后生效 /// </summary> /// <returns></returns> public string exportPlayersData() { return((cexportPlayersData != null) ? StrTool.c_str(cexportPlayersData()) : string.Empty); }
/// <summary> /// 获取物品原始标识字符 /// </summary> /// <param name="id">物品id</param> /// <returns>物品原始标识字符</returns> public string getItemRawname(int id) { return((cgetItemRawname != null) ? StrTool.c_str(cgetItemRawname(id)) : "unknow"); }