mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 12:23:59 +00:00
Split formatting perms for signs as well.
This commit is contained in:
parent
d20519ef8b
commit
284fef00e7
2 changed files with 11 additions and 20 deletions
|
@ -547,6 +547,14 @@ public class Util
|
||||||
{
|
{
|
||||||
message = Util.stripColor(input, VANILLA_COLOR_PATTERN);
|
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"))
|
if (user.isAuthorized(permBase + ".format"))
|
||||||
{
|
{
|
||||||
message = Util.replaceColor(message, REPLACE_FORMAT_PATTERN);
|
message = Util.replaceColor(message, REPLACE_FORMAT_PATTERN);
|
||||||
|
@ -565,14 +573,6 @@ public class Util
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String message = formatString(user, permBase, input);
|
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"))
|
if (!user.isAuthorized(permBase + ".url"))
|
||||||
{
|
{
|
||||||
message = Util.blockURL(message);
|
message = Util.blockURL(message);
|
||||||
|
|
|
@ -84,19 +84,10 @@ public class SignBlockListener implements Listener
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
User user = ess.getUser(event.getPlayer());
|
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)));
|
event.setLine(i, Util.formatString(user, "essentials.signs", event.getLine(i)));
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 4; i++)
|
|
||||||
{
|
|
||||||
event.setLine(i, Util.stripFormat(event.getLine(i)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Signs signs : Signs.values())
|
for (Signs signs : Signs.values())
|
||||||
|
|
Loading…
Reference in a new issue