Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }