SPIGOT-1677: Fix attributes with only single underscore.

This commit is contained in:
md_5 committed 2016-03-03 16:38:57 +11:00
1 parent 92439bb231
commit 4d3af9c19b
1 file changed
+4 -2
@@ -29,8 +29,10 @@ public class CraftAttributeMap implements Attributable {
StringBuilder sb = new StringBuilder(bukkit.toLowerCase());
sb.setCharAt(first, '.');
sb.deleteCharAt(second);
sb.setCharAt(second, bukkit.charAt(second + 1));
if (second != -1) {
sb.deleteCharAt(second);
sb.setCharAt(second, bukkit.charAt(second + 1));
}
return sb.toString();
}