mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-12 13:19:33 +00:00
Prevent players to create correct signs with essentials.signs.color permission.
This commit is contained in:
parent
aa663c0c98
commit
fcda9f9d3b
|
@ -88,6 +88,14 @@ public class SignBlockListener extends BlockListener
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
User user = ess.getUser(event.getPlayer());
|
||||||
|
if (user.isAuthorized("essentials.signs.color"))
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
event.setLine(i, event.getLine(i).replaceAll("&([0-9a-f])", "§$1"));
|
||||||
|
}
|
||||||
|
}
|
||||||
for (Signs signs : Signs.values())
|
for (Signs signs : Signs.values())
|
||||||
{
|
{
|
||||||
final EssentialsSign sign = signs.getSign();
|
final EssentialsSign sign = signs.getSign();
|
||||||
|
@ -103,14 +111,6 @@ public class SignBlockListener extends BlockListener
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
User user = ess.getUser(event.getPlayer());
|
|
||||||
if (user.isAuthorized("essentials.signs.color"))
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 4; i++)
|
|
||||||
{
|
|
||||||
event.setLine(i, event.getLine(i).replaceAll("&([0-9a-f])", "§$1"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue