Fix alerts being cut off at start

This commit is contained in:
md_5 2013-01-22 19:34:31 +11:00
parent e80c0de92b
commit 355d4988f3

View File

@ -23,7 +23,11 @@ public class CommandAlert extends Command
} else
{
StringBuilder builder = new StringBuilder();
if (!args[0].startsWith("&h"))
if (args[0].startsWith("&h"))
{
// Remove &h
args[0] = args[0].substring(2, args[0].length());
} else
{
builder.append(ChatColor.DARK_PURPLE);
builder.append("[Alert] ");
@ -31,7 +35,6 @@ public class CommandAlert extends Command
for (String s : args)
{
s = s.substring(1, s.length());
builder.append(ChatColor.translateAlternateColorCodes('&', s));
builder.append(" ");
}