From dc45346c7a2399e2ab7222570b0a0199cc2442a5 Mon Sep 17 00:00:00 2001 From: Sfiguz7 Date: Fri, 1 Oct 2021 17:18:48 +0200 Subject: [PATCH] Renamed meta to snapshot since it is one --- .../thebusybiscuit/slimefun4/utils/SlimefunUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java index 35b06cc88..68f9edf6c 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java @@ -314,15 +314,15 @@ public final class SlimefunUtils { } } - private static boolean equalsItemMeta(@Nonnull ItemMeta itemMeta, @Nonnull ItemMetaSnapshot meta, boolean checkLore) { - Optional displayName = meta.getDisplayName(); + private static boolean equalsItemMeta(@Nonnull ItemMeta itemMeta, @Nonnull ItemMetaSnapshot itemMetaSnapshot, boolean checkLore) { + Optional displayName = itemMetaSnapshot.getDisplayName(); if (itemMeta.hasDisplayName() != displayName.isPresent()) { return false; } else if (itemMeta.hasDisplayName() && displayName.isPresent() && !itemMeta.getDisplayName().equals(displayName.get())) { return false; } else if (checkLore) { - Optional> itemLore = meta.getLore(); + Optional> itemLore = itemMetaSnapshot.getLore(); if (itemMeta.hasLore() && itemLore.isPresent() && !equalsLore(itemMeta.getLore(), itemLore.get())) { return false; @@ -332,7 +332,7 @@ public final class SlimefunUtils { } // Fixes #3133: name and lore are not enough - OptionalInt itemCustomModelData = meta.getCustomModelData(); + OptionalInt itemCustomModelData = itemMetaSnapshot.getCustomModelData(); if (itemMeta.hasCustomModelData() && itemCustomModelData.isPresent() && itemMeta.getCustomModelData() != itemCustomModelData.getAsInt()) { return false; } else {