mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
Fixed an index out of range error in ChatColor.getLastColors
This commit is contained in:
parent
97ba2ff938
commit
ce87b04aae
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue