public string GetDisplayName() { if (Nbt != null) { if (Nbt.TryGet("display", out NbtCompound display)) { if (display.TryGet("Name", out NbtString name)) { return(name.Value); } } } return(DisplayName); }
public string GetDisplayName() { if (Nbt != null) { if (Nbt.TryGet("display", out NbtCompound display)) { if (display.TryGet("Name", out NbtString name)) { if (ValidateJSON(name.Value)) { return(ChatParser.ParseText(name.Value)); } return(name.Value); } } } return(DisplayName); }
public string GetDisplayName() { if (Nbt != null) { if (Nbt.TryGet("display", out NbtCompound display)) { if (display.TryGet("Name", out NbtString name)) { if (Alex.ServerType == ServerType.Java) { return(ChatParser.ParseText(name.Value)); } return(name.Value); } } } return(DisplayName); }