MCPcopy Create free account
hub / github.com/PaperMC/Paper / getMaterial

Method getMaterial

paper-api/src/main/java/org/bukkit/Material.java:3019–3022  ·  view source on GitHub ↗

Attempts to get the Material with the given name. This is a normal lookup, names must be the precise name they are given in the enum. @param name Name of the material to get @return Material if found, or null

(@NotNull final String name)

Source from the content-addressed store, hash-verified

3017 * @return Material if found, or null
3018 */
3019 @Nullable
3020 public static Material getMaterial(@NotNull final String name) {
3021 return getMaterial(name, false);
3022 }
3023
3024 /**
3025 * Attempts to get the Material with the given name.

Callers 8

getByNameMethod · 0.95
getByNameNullMethod · 0.95
matchMaterialMethod · 0.95
deserializeMethod · 0.95
getMaterialMethod · 0.95
CraftMetaBlockStateMethod · 0.95
CraftMagicNumbersClass · 0.95
getMaterialMethod · 0.95

Calls 4

getUnsafeMethod · 0.95
startsWithMethod · 0.80
getMethod · 0.65
fromLegacyMethod · 0.65

Tested by 2

getByNameMethod · 0.76
getByNameNullMethod · 0.76