Skip to content
Permalink
Browse files

Move paintingswitcher permission check to after checking if the mecha…

…nic is active.
  • Loading branch information...
me4502 committed Oct 2, 2016
1 parent 9e7bd2f commit 2d665c761fce45fe6657ea2060a7a796eb519100
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/com/sk89q/craftbook/mechanics/PaintingSwitch.java
@@ -86,11 +86,11 @@ public void onHeldItemChange(PlayerItemHeldEvent event) {

LocalPlayer player = CraftBookPlugin.inst().wrapPlayer(event.getPlayer());

if (!player.hasPermission("craftbook.mech.paintingswitch.use")) return;

if (players.get(player.getUniqueId()) == null)
return;

if (!player.hasPermission("craftbook.mech.paintingswitch.use")) return;

boolean isForwards;
if (event.getNewSlot() > event.getPreviousSlot()) {
isForwards = true;

0 comments on commit 2d665c7

Please sign in to comment.
You can’t perform that action at this time.