Exemple #1
0
        private byte[] GetColor(ChatElement element, bool shadowColor)
        {
            if (shadowColor)
            { // Shadow color
                return(MinecraftColors.GetColorBytes(element.Color, true));
            }

            // Normal color
            return(MinecraftColors.GetColorBytes(element.Color));
        }
 /// <summary>
 /// Accepts a char based control code and returns the json color name asociated with that control code.
 /// </summary>
 /// <param name="controlCode">The control code to fetch the json color name for.</param>
 /// <returns>Returns the chat element json color name for the passed control code.</returns>
 private static string GetJSONColorName(char controlCode)
 {
     return(MinecraftColors.GetName(controlCode));
 }