Skip to content

Commit

Permalink
fix MaterialUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
NONPLAYT committed Nov 28, 2024
1 parent f83bbcf commit 234af27
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package space.bxteam.commons.bukkit.inventory;

import org.apache.commons.lang3.StringUtils;
import org.bukkit.Material;
import org.jetbrains.annotations.NotNull;

Expand All @@ -18,6 +17,7 @@ private MaterialUtil() {
* @return the formatted material name
*/
public static String format(@NotNull Material material) {
return StringUtils.capitalize(material.name().toLowerCase().replace("_", " "));
String name = material.name().toLowerCase().replace("_", " ");
return name.substring(0, 1).toUpperCase() + name.substring(1);
}
}

0 comments on commit 234af27

Please sign in to comment.