Преглед изворни кода

Add deprecated constructor w/o startinglevel per d9e195f (#4647)

PikaMug пре 3 година
родитељ
комит
19c0f6757e
1 измењених фајлова са 11 додато и 3 уклоњено
  1. 11 3
      src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java

+ 11 - 3
src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java

@@ -43,12 +43,20 @@ public class PlayerProfile {
     private final Map<PrimarySkillType, Float> rollingSkillsXp = new EnumMap<PrimarySkillType, Float>(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<PrimarySkillType, Integer> levelData, Map<PrimarySkillType, Float> xpData, Map<SuperAbilityType, Integer> cooldownData, int scoreboardTipsShown, Map<UniqueDataType, Integer> uniqueProfileData, @Nullable Long lastLogin) {
+    public PlayerProfile(@NotNull String playerName, @Nullable UUID uuid, Map<PrimarySkillType, Integer> levelData, Map<PrimarySkillType, Float> xpData, Map<SuperAbilityType, Integer> cooldownData, int scoreboardTipsShown, Map<UniqueDataType, Integer> uniqueProfileData, @Nullable Long lastLogin) {
         this.playerName = playerName;
         this.uuid = uuid;
         this.scoreboardTipsShown = scoreboardTipsShown;