Split formatting perms for signs as well.

This commit is contained in:
KHobbits 2012-03-22 22:26:04 +00:00
parent d20519ef8b
commit 284fef00e7
2 changed files with 11 additions and 20 deletions

View File

@ -547,6 +547,14 @@ public class Util
{
message = Util.stripColor(input, VANILLA_COLOR_PATTERN);
}
if (user.isAuthorized(permBase + ".magic"))
{
message = Util.replaceColor(message, REPLACE_MAGIC_PATTERN);
}
else
{
message = Util.stripColor(message, VANILLA_MAGIC_PATTERN);
}
if (user.isAuthorized(permBase + ".format"))
{
message = Util.replaceColor(message, REPLACE_FORMAT_PATTERN);
@ -565,14 +573,6 @@ public class Util
return null;
}
String message = formatString(user, permBase, input);
if (user.isAuthorized(permBase + ".magic"))
{
message = Util.replaceColor(message, REPLACE_MAGIC_PATTERN);
}
else
{
message = Util.stripColor(message, VANILLA_MAGIC_PATTERN);
}
if (!user.isAuthorized(permBase + ".url"))
{
message = Util.blockURL(message);

View File

@ -84,19 +84,10 @@ public class SignBlockListener implements Listener
return;
}
User user = ess.getUser(event.getPlayer());
if (user.isAuthorized("essentials.signs.color"))
for (int i = 0; i < 4; i++)
{
for (int i = 0; i < 4; i++)
{
event.setLine(i, Util.replaceFormat(event.getLine(i)));
}
}
else
{
for (int i = 0; i < 4; i++)
{
event.setLine(i, Util.stripFormat(event.getLine(i)));
}
event.setLine(i, Util.formatString(user, "essentials.signs", event.getLine(i)));
}
for (Signs signs : Signs.values())