From 5f8b82d6ccff9de2d554f7dbd96aa5643c77e458 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 17 Jun 2024 20:56:19 +1000 Subject: [PATCH] #1426: Deprecate more unused methods in UnsafeValues By: 2008Choco --- .../org/bukkit/craftbukkit/util/CraftMagicNumbers.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java index b0a18b9b1a..f56b0d5fc0 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -335,19 +335,17 @@ public final class CraftMagicNumbers implements UnsafeValues { @Override public CreativeCategory getCreativeCategory(Material material) { - return CreativeCategory.BUILDING_BLOCKS; // TODO: Figure out what to do with this + return material.getCreativeCategory(); } @Override public String getBlockTranslationKey(Material material) { - Block block = getBlock(material); - return (block != null) ? block.getDescriptionId() : null; + return material.getBlockTranslationKey(); } @Override public String getItemTranslationKey(Material material) { - Item item = getItem(material); - return (item != null) ? item.getDescriptionId() : null; + return material.getItemTranslationKey(); } @Override