ChanceSD / PvPManager

Calling String.indexOf() with a single character string is inefficient JAVA-P1004
Performance
Major
2 months ago6 months old
This call should use the character variant of indexOf instead
131			if (dot != -1) {
132				version = version.substring(0, dot);
133			} else {
134				final int separator = version.indexOf("-");135				if (separator != -1) {
136					version = version.substring(0, separator);
137				}
This call should use the character variant of indexOf instead
127		if (version.startsWith("1.")) {
128			version = version.substring(2, 3);
129		} else {
130			final int dot = version.indexOf(".");131			if (dot != -1) {
132				version = version.substring(0, dot);
133			} else {