mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-12 05:08:48 +00:00
The sign permissions will be:
essentials.signs.create.* essentials.signs.use.* essentials.signs.break.*
This commit is contained in:
parent
bcf81d9f0a
commit
99268b9d9e
|
@ -31,7 +31,8 @@ public class EssentialsSign
|
||||||
final ISign sign = new EventSign(event);
|
final ISign sign = new EventSign(event);
|
||||||
sign.setLine(0, String.format(FORMAT_FAIL, this.signName));
|
sign.setLine(0, String.format(FORMAT_FAIL, this.signName));
|
||||||
final User user = ess.getUser(event.getPlayer());
|
final User user = ess.getUser(event.getPlayer());
|
||||||
if (!user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".create"))
|
if (!(user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".create")
|
||||||
|
|| user.isAuthorized("essentials.signs.create." + signName.toLowerCase())))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +64,8 @@ public class EssentialsSign
|
||||||
final User user = ess.getUser(event.getPlayer());
|
final User user = ess.getUser(event.getPlayer());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".use")
|
return (user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".use")
|
||||||
|
|| user.isAuthorized("essentials.signs.use." + signName.toLowerCase()))
|
||||||
&& onSignInteract(sign, user, getUsername(user), ess);
|
&& onSignInteract(sign, user, getUsername(user), ess);
|
||||||
}
|
}
|
||||||
catch (ChargeException ex)
|
catch (ChargeException ex)
|
||||||
|
@ -84,7 +86,7 @@ public class EssentialsSign
|
||||||
final User user = ess.getUser(event.getPlayer());
|
final User user = ess.getUser(event.getPlayer());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return user.isAuthorized("essentials.signs." + signName.toLowerCase() + ".break")
|
return user.isAuthorized("essentials.signs.break." + signName.toLowerCase())
|
||||||
&& onSignBreak(sign, user, getUsername(user), ess);
|
&& onSignBreak(sign, user, getUsername(user), ess);
|
||||||
}
|
}
|
||||||
catch (SignException ex)
|
catch (SignException ex)
|
||||||
|
|
Loading…
Reference in a new issue