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

Method legacyValueOf

paper-api/src/main/java/org/bukkit/DyeColor.java:207–211  ·  view source on GitHub ↗

Gets the DyeColor for the given name, possibly doing legacy transformations. @param name dye name @return dye color @apiNote Internal Use Only

(@Nullable String name)

Source from the content-addressed store, hash-verified

205 * @apiNote Internal Use Only
206 */
207 @org.jetbrains.annotations.ApiStatus.Internal // Paper
208 @NotNull
209 public static DyeColor legacyValueOf(@Nullable String name) {
210 return "SILVER".equals(name) ? DyeColor.LIGHT_GRAY : DyeColor.valueOf(name);
211 }
212
213 static {
214 BY_WOOL_DATA = values();

Callers 1

PatternMethod · 0.95

Calls 2

equalsMethod · 0.65
valueOfMethod · 0.65

Tested by

no test coverage detected