Prevents a permission error message when not trying to edit a sign
All checks were successful
KnarCraft/PlaceholderSigns/pipeline/head This commit looks good

This commit is contained in:
Kristian Knarvik 2024-04-23 14:42:53 +02:00
parent 598b6c9cb9
commit b33f514dca

View File

@ -59,15 +59,15 @@ public class SignClickListener implements Listener {
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
SignLineChangeRequest request = requestHandler.getSignChangeRequest(player);
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);
Side side = sign.getSide(Side.FRONT).equals(standingOn) ? Side.FRONT : Side.BACK;
doSignChange(sign, request, event, player, side);