Skip to content

Commit

Permalink
Simplify MaterialVanillaInterpreter::isVanilla
Browse files Browse the repository at this point in the history
  • Loading branch information
EverNife committed Sep 10, 2024
1 parent 350fa07 commit 9187c2e
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package br.com.finalcraft.evernifecore.material.interpreters;

import br.com.finalcraft.evernifecore.itemstack.FCItemFactory;
import br.com.finalcraft.evernifecore.util.FCItemUtils;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
Expand All @@ -23,8 +22,8 @@ public boolean isVanilla(Material material) {
}

try {
ItemStack itemStack = FCItemFactory.from(material).build();
String identifier = FCItemUtils.getMinecraftIdentifier(itemStack);
ItemStack itemStack = new ItemStack(material);
String identifier = FCItemUtils.getMinecraftIdentifier(itemStack, false);
if (identifier.startsWith("minecraft:")){
vanilla = true;
}else {
Expand Down

0 comments on commit 9187c2e

Please sign in to comment.