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

Method isValid

src/main/java/org/bukkit/map/MapFont.java:90–97  ·  view source on GitHub ↗

Check whether the given text is valid. @param text The text. @return True if the string contains only defined characters, false otherwise.

(@NotNull String text)

Source from the content-addressed store, hash-verified

88 * otherwise.
89 */
90 public boolean isValid(@NotNull String text) {
91 for (int i = 0; i < text.length(); ++i) {
92 char ch = text.charAt(i);
93 if (ch == ChatColor.COLOR_CHAR || ch == '\n') continue;
94 if (chars.get(ch) == null) return false;
95 }
96 return true;
97 }
98
99 /**
100 * Represents the graphics for a single character in a MapFont.

Callers 1

getWidthMethod · 0.95

Calls 2

getMethod · 0.65
lengthMethod · 0.45

Tested by

no test coverage detected