Skip to content

Commit

Permalink
include sign dying
Browse files Browse the repository at this point in the history
  • Loading branch information
SirYwell committed Jan 5, 2024
1 parent b64db18 commit ad24287
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,17 @@ public void onPlayerDyeSign(PlayerInteractEvent event) {
}
Plot plot = location.getOwnedPlot();
if (plot == null) {
if (PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, EditSignFlag.class, false)) {
if (PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, EditSignFlag.class, false)
&& !event.getPlayer().hasPermission(Permission.PERMISSION_ADMIN_INTERACT_ROAD.toString())) {
event.setCancelled(true);
}
return;
}
if (plot.isAdded(event.getPlayer().getUniqueId())) {
return; // allow for added players
}
if (!plot.getFlag(EditSignFlag.class)) {
if (!plot.getFlag(EditSignFlag.class)
&& !event.getPlayer().hasPermission(Permission.PERMISSION_ADMIN_INTERACT_OTHER.toString())) {
plot.debug(event.getPlayer().getName() + " could not color the sign because of edit-sign = false");
event.setCancelled(true);
}
Expand Down

0 comments on commit ad24287

Please sign in to comment.