Skip to content

Commit

Permalink
Fixes issue with some mods allowing signs to be edited.
Browse files Browse the repository at this point in the history
Fixes issue with some mods allowing signs to be edited.  This does not
protect non-BCS signs.
  • Loading branch information
AlexMason committed Apr 13, 2017
1 parent ce745ee commit bd13298
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public void leftClickBlockEvent(InteractBlockEvent.Primary event, @First Player
}

if (BCS.getInstance().getBCSData().isCommandSign(location)) {
event.setCancelled(true);
BCSSign sign = BCS.getInstance().getBCSData().getCommandSign(location);
if (!player.hasPermission("bcs.destroy")) {
event.setCancelled(true);
player.sendMessage(BCSConfig.getMessageTemplate("CannotDestroySigns"));
} else {
player.sendMessage(BCSConfig.getMessageTemplate("CommandSignDestroyed"));
Expand Down Expand Up @@ -157,6 +157,7 @@ public void rightClickBlockEvent(InteractBlockEvent.Secondary event, @First Play
}
} else { //USER LOGIC HERE
if (BCS.getInstance().getBCSData().isCommandSign(location)) {
event.setCancelled(true);
BCSSign sign = BCS.getInstance().getBCSData().getCommandSign(location);

if (player.hasPermission(sign.getPermission()) || sign.getPermission().equals("")) {
Expand Down

0 comments on commit bd13298

Please sign in to comment.