From c7a9ee32cd958c717a8e0ae757a5406979f9aac2 Mon Sep 17 00:00:00 2001 From: stevenh Date: Mon, 13 Feb 2012 21:22:47 +0000 Subject: [PATCH] Added ChatColor helper to Group useful for output methods --- TShockAPI/Group.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TShockAPI/Group.cs b/TShockAPI/Group.cs index 01131a5e..16448677 100644 --- a/TShockAPI/Group.cs +++ b/TShockAPI/Group.cs @@ -44,6 +44,11 @@ namespace TShockAPI byte.TryParse(chatcolor.Split(',')[2], out B); } + public string ChatColor() + { + return string.Format("{0}{1}{2}", R.ToString("X2"), G.ToString("X2"), B.ToString("X2")); + } + public virtual bool HasPermission(string permission) { var cur = this;