Prevents a permission error message when not trying to edit a sign
All checks were successful
KnarCraft/PlaceholderSigns/pipeline/head This commit looks good
All checks were successful
KnarCraft/PlaceholderSigns/pipeline/head This commit looks good
This commit is contained in:
parent
598b6c9cb9
commit
b33f514dca
@ -59,15 +59,15 @@ public class SignClickListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sign.isWaxed() && !player.hasPermission("placeholdersigns.edit.bypass-waxed")) {
|
|
||||||
PlaceholderSigns.getInstance().getStringFormatter().displayErrorMessage(player,
|
|
||||||
PlaceholderSignMessage.ERROR_WAXED_NO_PERMISSION);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if the player has run the /editSign command
|
// Check if the player has run the /editSign command
|
||||||
SignLineChangeRequest request = requestHandler.getSignChangeRequest(player);
|
SignLineChangeRequest request = requestHandler.getSignChangeRequest(player);
|
||||||
if (request != null) {
|
if (request != null) {
|
||||||
|
if (sign.isWaxed() && !player.hasPermission("placeholdersigns.edit.bypass-waxed")) {
|
||||||
|
PlaceholderSigns.getInstance().getStringFormatter().displayErrorMessage(player,
|
||||||
|
PlaceholderSignMessage.ERROR_WAXED_NO_PERMISSION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SignSide standingOn = sign.getTargetSide(player);
|
SignSide standingOn = sign.getTargetSide(player);
|
||||||
Side side = sign.getSide(Side.FRONT).equals(standingOn) ? Side.FRONT : Side.BACK;
|
Side side = sign.getSide(Side.FRONT).equals(standingOn) ? Side.FRONT : Side.BACK;
|
||||||
doSignChange(sign, request, event, player, side);
|
doSignChange(sign, request, event, player, side);
|
||||||
|
Loading…
Reference in New Issue
Block a user