MCPcopy Create free account
hub / github.com/Teneted/Tenet / matchMaterial

Method matchMaterial

src/main/java/org/bukkit/Material.java:4619–4622  ·  view source on GitHub ↗

Attempts to match the Material with the given name. This is a match lookup; names will be stripped of the "minecraft:" namespace, converted to uppercase, then stripped of special characters in an attempt to format it like the enum. @param name Name of the material to get @return Material if fou

(@NotNull final String name)

Source from the content-addressed store, hash-verified

4617 * @return Material if found, or null
4618 */
4619 @Nullable
4620 public static Material matchMaterial(@NotNull final String name) {
4621 return matchMaterial(name, false);
4622 }
4623
4624 /**
4625 * Attempts to match the Material with the given name.

Callers 2

matchMaterialMethod · 0.95
getMaterialMethod · 0.95

Calls 3

getMaterialMethod · 0.95
toUpperCaseMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected