From 58fa0cbe611d0063b5aaa45bd23b491b7ef46ece Mon Sep 17 00:00:00 2001 From: Brianna Date: Sat, 18 Apr 2020 09:22:57 -0400 Subject: [PATCH] Code cleanup Code cleanup --- src/main/java/com/songoda/epichoppers/tasks/HopTask.java | 2 +- .../com/songoda/epichoppers/utils/StorageContainerCache.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/songoda/epichoppers/tasks/HopTask.java b/src/main/java/com/songoda/epichoppers/tasks/HopTask.java index be3104c..83caaad 100644 --- a/src/main/java/com/songoda/epichoppers/tasks/HopTask.java +++ b/src/main/java/com/songoda/epichoppers/tasks/HopTask.java @@ -106,7 +106,7 @@ public class HopTask extends BukkitRunnable { // Cycle through modules. hopper.getLevel().getRegisteredModules().stream() - .filter(module -> module != null) + .filter(Objects::nonNull) .forEach(module -> { // Run Module module.run(hopper, hopperCache); diff --git a/src/main/java/com/songoda/epichoppers/utils/StorageContainerCache.java b/src/main/java/com/songoda/epichoppers/utils/StorageContainerCache.java index 34f7e9c..3f9f673 100644 --- a/src/main/java/com/songoda/epichoppers/utils/StorageContainerCache.java +++ b/src/main/java/com/songoda/epichoppers/utils/StorageContainerCache.java @@ -80,7 +80,7 @@ public class StorageContainerCache { } else { // legacy check Material material = block.getType(); - BlockFace[] faces = new BlockFace[]{BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST}; + BlockFace[] faces = new BlockFace[] {BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST}; for (BlockFace face : faces) { Block adjacentBlock = block.getRelative(face);