Create a DGlobalPlayer on DPlayers initialization. Resolves #43

This commit is contained in:
Daniel Saukel 2016-03-28 12:09:38 +02:00
parent 383e4b6e61
commit 3c08691866
2 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.dre2n</groupId>
<artifactId>dungeonsxl</artifactId>
<version>0.11-SNAPSHOT-29</version>
<version>0.11-SNAPSHOT</version>
<packaging>jar</packaging>
<name>DungeonsXL</name>
<url>https://dre2n.github.io</url>

View File

@ -29,6 +29,12 @@ public class DPlayers {
private List<DGlobalPlayer> dGlobalPlayers = new CopyOnWriteArrayList<>();
private List<DSavePlayer> dSavePlayers = new CopyOnWriteArrayList<>();
public DPlayers() {
for (Player player : Bukkit.getOnlinePlayers()) {
new DGlobalPlayer(player);
}
}
/**
* @return the DGlobalPlayer which represents the player
*/