From 19c0f6757e802a3ccbb8617640b15b64ef41cc0e Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Mon, 8 Nov 2021 22:00:00 -0500 Subject: [PATCH] Add deprecated constructor w/o startinglevel per d9e195f (#4647) --- .../nossr50/datatypes/player/PlayerProfile.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java index ff9ebbb70..7f383ed61 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java @@ -43,12 +43,20 @@ public class PlayerProfile { private final Map rollingSkillsXp = new EnumMap(PrimarySkillType.class); @Deprecated - //TODO: Add deprecated constructor w/o startinglevel + public PlayerProfile(String playerName) { + this(playerName, null, 0); + } + + @Deprecated + public PlayerProfile(String playerName, UUID uuid) { + this(playerName, uuid, 0); + } + + @Deprecated public PlayerProfile(String playerName, int startingLevel) { this(playerName, null, startingLevel); } - //TODO: Add deprecated constructor w/o startinglevel public PlayerProfile(String playerName, @Nullable UUID uuid, int startingLevel) { this.uuid = uuid; this.playerName = playerName; @@ -80,7 +88,7 @@ public class PlayerProfile { this.loaded = isLoaded; } - public PlayerProfile(@NotNull String playerName, UUID uuid, Map levelData, Map xpData, Map cooldownData, int scoreboardTipsShown, Map uniqueProfileData, @Nullable Long lastLogin) { + public PlayerProfile(@NotNull String playerName, @Nullable UUID uuid, Map levelData, Map xpData, Map cooldownData, int scoreboardTipsShown, Map uniqueProfileData, @Nullable Long lastLogin) { this.playerName = playerName; this.uuid = uuid; this.scoreboardTipsShown = scoreboardTipsShown;