mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 13:24:17 -07:00
Fixed an index out of range error in ChatColor.getLastColors
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
@@ -222,7 +222,7 @@ public enum ChatColor {
|
||||
int length = input.length();
|
||||
|
||||
while ((lastIndex = input.indexOf(COLOR_CHAR, lastIndex + 1)) != -1) {
|
||||
if (lastIndex != length) {
|
||||
if (lastIndex < length - 1) {
|
||||
char c = input.charAt(lastIndex + 1);
|
||||
ChatColor col = getByChar(c);
|
||||
|
||||
|
Reference in New Issue
Block a user