MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / getByChar

Method getByChar

src/main/java/com/volmit/adapt/util/C.java:331–337  ·  view source on GitHub ↗

Gets the color represented by the specified color code @param code Code to check @return Associative org.bukkit.ChatColor with the given code, or null if it doesn't exist

(char code)

Source from the content-addressed store, hash-verified

329 * if it doesn't exist
330 */
331 public static C getByChar(char code) {
332 try {
333 return BY_CHAR.get(code);
334 } catch (Exception e) {
335 return C.WHITE;
336 }
337 }
338
339 /**
340 * Gets the color represented by the specified color code

Callers 2

getLastColorsMethod · 0.95
chatColorMethod · 0.80

Calls 2

getMethod · 0.65
lengthMethod · 0.45

Tested by

no test coverage detected