瀏覽代碼

Removed functions for getting the PlayerProfile - using API classes is
preferred, but if not the McMMOPlayer should be used instead

GJ 12 年之前
父節點
當前提交
d004361836

+ 1 - 0
Changelog.txt

@@ -18,6 +18,7 @@ Version 1.4.04-dev
  = Fixed bug where the API would fail if the name of a player's current party is requested when the player isn't in one (Thanks @dualspiral!)
  = Fixed bug with retrieving a player's party members
  - Removed deprecated functions from API classes.
+ - Removed functions for getting the PlayerProfile - using API classes is preferred, but if not the McMMOPlayer should be used instead
 
 Version 1.4.03
  + Added option to advanced.yml to determine the # of enchant levels used when buffing Super Breaker & Giga Drill Breaker

+ 0 - 39
src/main/java/com/gmail/nossr50/mcMMO.java

@@ -8,7 +8,6 @@ import java.util.List;
 
 import net.shatteredlands.shatt.backup.ZipLibrary;
 
-import org.bukkit.OfflinePlayer;
 import org.bukkit.entity.Player;
 import org.bukkit.event.HandlerList;
 import org.bukkit.metadata.FixedMetadataValue;
@@ -27,7 +26,6 @@ import com.gmail.nossr50.config.spout.SpoutConfig;
 import com.gmail.nossr50.config.treasure.TreasureConfig;
 import com.gmail.nossr50.database.DatabaseManager;
 import com.gmail.nossr50.database.LeaderboardManager;
-import com.gmail.nossr50.datatypes.player.PlayerProfile;
 import com.gmail.nossr50.listeners.BlockListener;
 import com.gmail.nossr50.listeners.EntityListener;
 import com.gmail.nossr50.listeners.InventoryListener;
@@ -197,43 +195,6 @@ public class mcMMO extends JavaPlugin {
         getLogger().info("Was disabled."); // How informative!
     }
 
-    /**
-     * Get profile of the player by name.
-     * </br>
-     * This function is designed for API usage.
-     *
-     * @param playerName Name of player whose profile to get
-     * @return the PlayerProfile object
-     */
-    public PlayerProfile getPlayerProfile(String playerName) {
-        return UserManager.getPlayer(playerName).getProfile();
-    }
-
-    /**
-     * Get profile of the player.
-     * </br>
-     * This function is designed for API usage.
-     *
-     * @param player player whose profile to get
-     * @return the PlayerProfile object
-     */
-    public PlayerProfile getPlayerProfile(OfflinePlayer player) {
-        return UserManager.getPlayer(player.getName()).getProfile();
-    }
-
-    /**
-     * Get profile of the player.
-     * </br>
-     * This function is designed for API usage.
-     *
-     * @param player player whose profile to get
-     * @return the PlayerProfile object
-     */
-    @Deprecated
-    public PlayerProfile getPlayerProfile(Player player) {
-        return UserManager.getProfile(player);
-    }
-
     /**
      * Add a set of values to the TNT tracker.
      *

+ 0 - 25
src/main/java/com/gmail/nossr50/util/player/UserManager.java

@@ -10,7 +10,6 @@ import org.bukkit.entity.Player;
 
 import com.gmail.nossr50.mcMMO;
 import com.gmail.nossr50.datatypes.player.McMMOPlayer;
-import com.gmail.nossr50.datatypes.player.PlayerProfile;
 
 public final class UserManager {
     private static Map<String, McMMOPlayer> players = new HashMap<String, McMMOPlayer>();
@@ -81,30 +80,6 @@ public final class UserManager {
         return players;
     }
 
-    /**
-     * Get the profile of a player.
-     *
-     * @param player The player whose profile to retrieve
-     * @return the player's profile
-     */
-    @Deprecated
-    public static PlayerProfile getProfile(OfflinePlayer player) {
-        return getProfile(player.getName());
-    }
-
-    /**
-     * Get the profile of a player by name.
-     *
-     * @param playerName The name of the player whose profile to retrieve
-     * @return the player's profile
-     */
-    @Deprecated
-    public static PlayerProfile getProfile(String playerName) {
-        McMMOPlayer mcmmoPlayer = players.get(playerName);
-
-        return (mcmmoPlayer != null) ? mcmmoPlayer.getProfile() : null;
-    }
-
     /**
      * Get the McMMOPlayer of a player by name.
      *