diff --git a/src/dev/w1zzrd/invtweaks/command/SearchCommandExecutor.java b/src/dev/w1zzrd/invtweaks/command/SearchCommandExecutor.java index fbf9391..b2a77cd 100644 --- a/src/dev/w1zzrd/invtweaks/command/SearchCommandExecutor.java +++ b/src/dev/w1zzrd/invtweaks/command/SearchCommandExecutor.java @@ -15,6 +15,7 @@ import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.*; +import java.util.Comparator; import java.util.logging.Logger; import static dev.w1zzrd.invtweaks.listener.TabCompletionListener.getMaterialMatching; @@ -49,11 +50,12 @@ public class SearchCommandExecutor extends ConfigurableCommandExecutor matches = searchChunks( - player.getLocation().getChunk(), + playerLocation.getChunk(), config.getSearchRadiusX(), Material.CHEST, Material.TRAPPED_CHEST, Material.SHULKER_BOX ); @@ -62,6 +64,8 @@ public class SearchCommandExecutor extends ConfigurableCommandExecutor state.getLocation().distanceSquared(playerLocation))); + final InventoryHolder result; FIND_RESULT: