|
@@ -7,9 +7,6 @@ import java.io.FileWriter;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
|
|
|
-import org.bukkit.OfflinePlayer;
|
|
|
|
-import org.bukkit.entity.Player;
|
|
|
|
-
|
|
|
|
import com.gmail.nossr50.mcMMO;
|
|
import com.gmail.nossr50.mcMMO;
|
|
import com.gmail.nossr50.config.Config;
|
|
import com.gmail.nossr50.config.Config;
|
|
import com.gmail.nossr50.config.SpoutConfig;
|
|
import com.gmail.nossr50.config.SpoutConfig;
|
|
@@ -19,6 +16,8 @@ import com.gmail.nossr50.util.Misc;
|
|
|
|
|
|
public class PlayerProfile {
|
|
public class PlayerProfile {
|
|
|
|
|
|
|
|
+ private String playerName;
|
|
|
|
+
|
|
/* HUD */
|
|
/* HUD */
|
|
private SpoutHud spoutHud;
|
|
private SpoutHud spoutHud;
|
|
|
|
|
|
@@ -51,14 +50,10 @@ public class PlayerProfile {
|
|
HashMap<AbilityType, Integer> skillsDATS = new HashMap<AbilityType, Integer>();
|
|
HashMap<AbilityType, Integer> skillsDATS = new HashMap<AbilityType, Integer>();
|
|
HashMap<ToolType, Integer> toolATS = new HashMap<ToolType, Integer>();
|
|
HashMap<ToolType, Integer> toolATS = new HashMap<ToolType, Integer>();
|
|
|
|
|
|
- private OfflinePlayer player;
|
|
|
|
- private String playerName;
|
|
|
|
private final static String location = mcMMO.usersFile;
|
|
private final static String location = mcMMO.usersFile;
|
|
|
|
|
|
- public PlayerProfile(OfflinePlayer player, boolean addNew) {
|
|
|
|
- this.player = player;
|
|
|
|
- this.playerName = player.getName();
|
|
|
|
-
|
|
|
|
|
|
+ public PlayerProfile(String playerName, boolean addNew) {
|
|
|
|
+ this.playerName = playerName;
|
|
party = PartyManager.getInstance().getPlayerParty(playerName);
|
|
party = PartyManager.getInstance().getPlayerParty(playerName);
|
|
|
|
|
|
for (AbilityType abilityType : AbilityType.values()) {
|
|
for (AbilityType abilityType : AbilityType.values()) {
|
|
@@ -84,19 +79,10 @@ public class PlayerProfile {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-// public Player getPlayer() {
|
|
|
|
-// return player;
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
public String getPlayerName() {
|
|
public String getPlayerName() {
|
|
return playerName;
|
|
return playerName;
|
|
}
|
|
}
|
|
|
|
|
|
- public void setPlayer(Player player) {
|
|
|
|
- this.player = player;
|
|
|
|
- this.playerName = player.getName();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
public boolean loadMySQL() {
|
|
public boolean loadMySQL() {
|
|
userId = mcMMO.database.getInt("SELECT id FROM " + Config.getInstance().getMySQLTablePrefix() + "users WHERE user = '" + playerName + "'");
|
|
userId = mcMMO.database.getInt("SELECT id FROM " + Config.getInstance().getMySQLTablePrefix() + "users WHERE user = '" + playerName + "'");
|
|
|
|
|