mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-13 03:40:38 +01: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;
|
||||
}
|
||||
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())
|
||||
{
|
||||
final EssentialsSign sign = signs.getSign();
|
||||
@ -103,14 +111,6 @@ public class SignBlockListener extends BlockListener
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user