diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuide.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuide.java index e91d36f3c..662320f53 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuide.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuide.java @@ -82,10 +82,6 @@ public final class SlimefunGuide { @ParametersAreNonnullByDefault public static void openCategory(PlayerProfile profile, Category category, SlimefunGuideMode layout, int selectedPage) { - if (category == null) { - return; - } - SlimefunPlugin.getRegistry().getGuideLayout(layout).openCategory(profile, category, selectedPage); } @@ -110,8 +106,12 @@ public final class SlimefunGuide { SlimefunPlugin.getRegistry().getGuideLayout(SlimefunGuideMode.SURVIVAL_MODE).displayItem(profile, item, addToHistory); } - public static boolean isGuideItem(@Nonnull ItemStack item) { - return SlimefunUtils.isItemSimilar(item, getItem(SlimefunGuideMode.SURVIVAL_MODE), true) || SlimefunUtils.isItemSimilar(item, getItem(SlimefunGuideMode.CHEAT_MODE), true); + public static boolean isGuideItem(@Nullable ItemStack item) { + if (item == null) { + return false; + } else { + return SlimefunUtils.isItemSimilar(item, getItem(SlimefunGuideMode.SURVIVAL_MODE), true) || SlimefunUtils.isItemSimilar(item, getItem(SlimefunGuideMode.CHEAT_MODE), true); + } } /** diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/networks/cargo/CargoUtils.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/networks/cargo/CargoUtils.java index 39b92f78f..7b73eafe8 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/networks/cargo/CargoUtils.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/networks/cargo/CargoUtils.java @@ -393,19 +393,6 @@ final class CargoUtils { } } - /** - * Get the whitelist/blacklist slots in a Cargo Input Node. If you wish to access the items - * in the cargo (without hardcoding the slots in case of change) then you can use this method. - * - * @deprecated Renamed to {@link #getFilteringSlots()} - * - * @return The slot indexes for the whitelist/blacklist section. - */ - @Deprecated - public static int[] getWhitelistBlacklistSlots() { - return getFilteringSlots(); - } - /** * Gets the {@link ItemFilter} slots for a Cargo Node. If you wish to access the items * in the cargo (without hardcoding the slots in case of change) then you can use this method. diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/elevator/ElevatorPlate.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/elevator/ElevatorPlate.java index 413a9fc44..7cf17b8c0 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/elevator/ElevatorPlate.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/elevator/ElevatorPlate.java @@ -136,7 +136,6 @@ public class ElevatorPlate extends SimpleSlimefunItem { ChestMenu menu = new ChestMenu(SlimefunPlugin.getLocalization().getMessage(p, "machines.ELEVATOR.pick-a-floor")); menu.setEmptySlotsClickable(false); - int pages = 1 + (floors.size() / GUI_SIZE); int index = GUI_SIZE * (page - 1); for (int i = 0; i < Math.min(GUI_SIZE, floors.size() - index); i++) { @@ -162,6 +161,8 @@ public class ElevatorPlate extends SimpleSlimefunItem { // @formatter:on } + int pages = 1 + (floors.size() / GUI_SIZE); + // 0 index so size is the first slot of the last row. for (int i = GUI_SIZE; i < GUI_SIZE + 9; i++) { if (i == GUI_SIZE + 2 && pages > 1 && page != 1) {