From 574ed9aa41e52b96092241dc031e23a05bf08a18 Mon Sep 17 00:00:00 2001 From: Kenzie Togami Date: Thu, 5 May 2016 20:08:48 -0700 Subject: [PATCH] Fix some formatting concerns. --- .../java/com/sk89q/worldedit/util/Java8Detector.java | 4 ++-- .../com/sk89q/worldedit/forge/ForgeWorldEdit.java | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/Java8Detector.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/Java8Detector.java index 74510840e..71a05d667 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/Java8Detector.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/Java8Detector.java @@ -29,8 +29,8 @@ public final class Java8Detector { if (major <= 7) { // Implicitly java 7 because we compile against 7, so this won't // even launch on 6. - WorldEdit.logger - .warning("WorldEdit has detected you are using Java 7" + WorldEdit.logger.warning( + "WorldEdit has detected you are using Java 7" + " (based on detected version " + Joiner.on('.').join(ver) + ")."); WorldEdit.logger.warning( diff --git a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java index 8f459b2e2..46300364f 100644 --- a/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java +++ b/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java @@ -157,14 +157,16 @@ public class ForgeWorldEdit { if (!platform.isHookingEvents()) return; // We have to be told to catch these events - if ((event instanceof PlayerInteractEvent.LeftClickBlock + boolean isLeftDeny = event instanceof PlayerInteractEvent.LeftClickBlock && ((PlayerInteractEvent.LeftClickBlock) event) - .getUseItem() == Result.DENY) - || (event instanceof PlayerInteractEvent.RightClickBlock + .getUseItem() == Result.DENY; + boolean isRightDeny = + event instanceof PlayerInteractEvent.RightClickBlock && ((PlayerInteractEvent.RightClickBlock) event) - .getUseItem() == Result.DENY) - || event.getEntity().worldObj.isRemote) + .getUseItem() == Result.DENY; + if (isLeftDeny || isRightDeny || event.getEntity().worldObj.isRemote) { return; + } WorldEdit we = WorldEdit.getInstance(); ForgePlayer player = wrap((EntityPlayerMP) event.getEntityPlayer());