Skip to content

Commit

Permalink
Remove redundant material namespace check (#7121)
Browse files Browse the repository at this point in the history
  • Loading branch information
0XPYEX0 authored Oct 1, 2024
1 parent 92ba72d commit cd65207
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/java/ch/njol/skript/bukkitutil/BukkitUnsafe.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@ public class BukkitUnsafe {

@Nullable
public static Material getMaterialFromMinecraftId(String id) {
// On 1.13, Vanilla and Spigot names are same
if (id.length() > 9)
return Material.matchMaterial(id.substring(10)); // Strip 'minecraft:' out
else // Malformed material name
return null;
return Material.matchMaterial(id);
}

public static void modifyItemStack(ItemStack stack, String arguments) {
Expand Down

0 comments on commit cd65207

Please sign in to comment.