[SPIGOT-3348] Skin cache fix Created: 17/Jun/17 Updated: 11/Dec/17 Resolved: 18/Jun/17 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Kostya | Assignee: | md_5 |
Resolution: | Fixed | Votes: | 1 |
Labels: | cache, skin | ||
Environment: |
1.11.2 |
Description |
Current skinCache in TileEntitySkull has small issue. It searches skin for skull and writes it in cache with pair of name-gameprofile. Issue is really small. It searches in cache with normal nick name, and if skin not found, it lookups for the skin and writes it with lower cased name! To fix skin cache you need:
And skin cache will be fixed! No more workarounds for heads!
p.s. version copied from another issue. I don't see fix here: So, i reported about this. Sorry for bad english. |
Comments |
Comment by Black Hole [ 17/Jun/17 ] |
A better fix would be to always search by lower case. (And fix the toLowerCase() to always use the same locale.) |
Comment by Kostya [ 17/Jun/17 ] |
Oh, yes! You must make some fixes in CraftMetaSkull in setOwner method. This: profile = TileEntitySkull.skinCache.getIfPresent(name.toLowerCase(java.util.Locale.ROOT)); must be: profile = TileEntitySkull.skinCache.getIfPresent(name); |