This commit is contained in:
Olof Larsson
2011-02-13 17:04:06 +01:00
parent 478116c418
commit d3c5868ca4
10 changed files with 50 additions and 79 deletions

View File

@@ -25,7 +25,7 @@ public class EM {
// hardcoded config
protected final static String ext = ".json";
protected final static File folderBase = Factions.folder;
protected final static File folderBase = Factions.factions.getDataFolder();
protected final static File folderFaction = new File(folderBase, "faction");
protected final static File folderFollower = new File(folderBase, "follower");
protected final static File folderBoard = new File(folderBase, "board");

View File

@@ -202,7 +202,7 @@ public class Faction {
public ArrayList<Player> getOnlinePlayers() {
ArrayList<Player> ret = new ArrayList<Player>();
for (Player player: Factions.server.getOnlinePlayers()) {
for (Player player: Factions.factions.getServer().getOnlinePlayers()) {
Follower follower = Follower.get(player);
if (follower.factionId == this.id) {
ret.add(player);

View File

@@ -11,6 +11,7 @@ import com.bukkit.mcteam.util.ChatFixUtil;
public class Follower {
public transient String id; // The is the name of the player
public transient Coord lastStoodInCoord = new Coord(); // Where did this player stand the last time we checked?
public int factionId;
public Role role;
@@ -46,7 +47,7 @@ public class Follower {
}
public Player getPlayer() {
return Factions.server.getPlayer(this.getName());
return Factions.factions.getServer().getPlayer(this.getName());
}
public boolean isOnline() {