Removed functions for getting the PlayerProfile - using API classes is

preferred, but if not the McMMOPlayer should be used instead
This commit is contained in:
GJ 2013-03-18 11:34:11 -04:00
parent 5453b0511d
commit d004361836
3 changed files with 1 additions and 64 deletions

View File

@ -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 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 = Fixed bug with retrieving a player's party members
- Removed deprecated functions from API classes. - 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 Version 1.4.03
+ Added option to advanced.yml to determine the # of enchant levels used when buffing Super Breaker & Giga Drill Breaker + Added option to advanced.yml to determine the # of enchant levels used when buffing Super Breaker & Giga Drill Breaker

View File

@ -8,7 +8,6 @@ import java.util.List;
import net.shatteredlands.shatt.backup.ZipLibrary; import net.shatteredlands.shatt.backup.ZipLibrary;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList; import org.bukkit.event.HandlerList;
import org.bukkit.metadata.FixedMetadataValue; 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.config.treasure.TreasureConfig;
import com.gmail.nossr50.database.DatabaseManager; import com.gmail.nossr50.database.DatabaseManager;
import com.gmail.nossr50.database.LeaderboardManager; import com.gmail.nossr50.database.LeaderboardManager;
import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.listeners.BlockListener; import com.gmail.nossr50.listeners.BlockListener;
import com.gmail.nossr50.listeners.EntityListener; import com.gmail.nossr50.listeners.EntityListener;
import com.gmail.nossr50.listeners.InventoryListener; import com.gmail.nossr50.listeners.InventoryListener;
@ -197,43 +195,6 @@ public class mcMMO extends JavaPlugin {
getLogger().info("Was disabled."); // How informative! 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. * Add a set of values to the TNT tracker.
* *

View File

@ -10,7 +10,6 @@ import org.bukkit.entity.Player;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.datatypes.player.PlayerProfile;
public final class UserManager { public final class UserManager {
private static Map<String, McMMOPlayer> players = new HashMap<String, McMMOPlayer>(); private static Map<String, McMMOPlayer> players = new HashMap<String, McMMOPlayer>();
@ -81,30 +80,6 @@ public final class UserManager {
return players; 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. * Get the McMMOPlayer of a player by name.
* *