mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-16 23:55:28 +01:00
Split formatting perms for signs as well.
This commit is contained in:
parent
d20519ef8b
commit
284fef00e7
@ -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);
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user