Skip to content

Commit

Permalink
feat(User): New config option for default skin UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeV220 committed Mar 9, 2023
1 parent 7711190 commit 7cbef7d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Expand Up @@ -2,6 +2,7 @@

import com.georgev22.library.utilities.Utils;
import com.georgev22.skinoverlay.SkinOverlay;
import com.georgev22.skinoverlay.utilities.OptionsUtil;
import com.georgev22.skinoverlay.utilities.Utilities.Request;
import com.georgev22.skinoverlay.utilities.player.PlayerObject;
import com.google.gson.*;
Expand Down Expand Up @@ -212,7 +213,7 @@ public String getXUID(@NotNull final PlayerObject playerObject) throws IOExcepti
*/
public UUID getUUID(final String playerName) throws IOException {
if (!isUsernamePremium(playerName)) {
return UUID.fromString("8667ba71-b85a-4004-af54-457a9734eed7");
return UUID.fromString(OptionsUtil.DEFAULT_SKIN_UUID.getStringValue());
}
Request request;
try {
Expand Down
Expand Up @@ -5,7 +5,8 @@
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;

import java.util.*;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;

public enum OptionsUtil {
Expand Down Expand Up @@ -63,6 +64,7 @@ public enum OptionsUtil {
OVERLAY_RIGHT_PANTS("overlays.%s.right_pants", false, Optional.empty()),

OVERLAY_HAT("overlays.%s.hat", false, Optional.empty()),
DEFAULT_SKIN_UUID("default skin uuid", "8667ba71-b85a-4004-af54-457a9734eed7", Optional.empty()),
;
private static final SkinOverlay mainPlugin = SkinOverlay.getInstance();
private final String pathName;
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/config.yml
Expand Up @@ -7,6 +7,7 @@ Options:
enabled: true
download: false
restart: false
default skin uuid: "8667ba71-b85a-4004-af54-457a9734eed7"
# None, MySQL, PostgreSQL, SQLite, MongoDB
# Select in what type you want your data to be stored
# SQLite is recommended
Expand Down

0 comments on commit 7cbef7d

Please sign in to comment.