refactor: extract uuid to var
This commit is contained in:
parent
338a470468
commit
aba24384d5
1 changed files with 4 additions and 3 deletions
|
@ -10,9 +10,10 @@ import java.util.UUID;
|
||||||
public class SkinPlaceholder extends AsyncItem {
|
public class SkinPlaceholder extends AsyncItem {
|
||||||
public SkinPlaceholder(String name) {
|
public SkinPlaceholder(String name) {
|
||||||
super(new ItemBuilder(Material.PAINTING).setDisplayName("§7§oLoading..."), () -> {
|
super(new ItemBuilder(Material.PAINTING).setDisplayName("§7§oLoading..."), () -> {
|
||||||
String uuid = name.replaceAll("(.{8})(.{4})(.{4})(.{4})(.+)", "$1-$2-$3-$4-$5");
|
final String stringUUID = name.replaceAll("(.{8})(.{4})(.{4})(.{4})(.+)", "$1-$2-$3-$4-$5");
|
||||||
final SkullBuilder skull = new SkullBuilder(UUID.fromString(uuid));
|
final UUID uuid = UUID.fromString(stringUUID);
|
||||||
skull.setDisplayName("Skin");
|
final SkullBuilder skull = new SkullBuilder(uuid);
|
||||||
|
skull.setDisplayName("§6Skin Entry");
|
||||||
skull.addLoreLines("§7Click to invalidate skin");
|
skull.addLoreLines("§7Click to invalidate skin");
|
||||||
return skull;
|
return skull;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue