From 6b36c660591a3d91f963c574fe303e00e3864491 Mon Sep 17 00:00:00 2001 From: kikelkik Date: Sun, 5 Feb 2023 12:29:09 +0100 Subject: [PATCH] change /depositall minY to min height of world (issue #50) --- pom.xml | 6 +++--- .../ryanhamshire/AutomaticInventory/AutomaticInventory.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 0ab2d50..1dc775f 100644 --- a/pom.xml +++ b/pom.xml @@ -92,9 +92,9 @@ - org.bukkit - bukkit - 1.14.4-R0.1-SNAPSHOT + org.spigotmc + spigot-api + 1.19-R0.1-SNAPSHOT provided diff --git a/src/me/ryanhamshire/AutomaticInventory/AutomaticInventory.java b/src/me/ryanhamshire/AutomaticInventory/AutomaticInventory.java index 9ebe16d..491031f 100644 --- a/src/me/ryanhamshire/AutomaticInventory/AutomaticInventory.java +++ b/src/me/ryanhamshire/AutomaticInventory/AutomaticInventory.java @@ -240,7 +240,7 @@ else if(cmd.getName().equalsIgnoreCase("depositall") && player != null) } //create a thread to search those snapshots and create a chain of quick deposit attempts - int minY = Math.max(0, player.getEyeLocation().getBlockY() - 10); + int minY = Math.max(world.getMinHeight(), player.getEyeLocation().getBlockY() - 10); int maxY = Math.min(world.getMaxHeight(), player.getEyeLocation().getBlockY() + 10); int startY = player.getEyeLocation().getBlockY(); int startX = player.getEyeLocation().getBlockX();