From 3c086918663ad38d44c02e423c890390e893e906 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 28 Mar 2016 12:09:38 +0200 Subject: [PATCH] Create a DGlobalPlayer on DPlayers initialization. Resolves #43 --- pom.xml | 2 +- .../java/io/github/dre2n/dungeonsxl/player/DPlayers.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ec760898..b3e4a0ec 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 io.github.dre2n dungeonsxl - 0.11-SNAPSHOT-29 + 0.11-SNAPSHOT jar DungeonsXL https://dre2n.github.io diff --git a/src/main/java/io/github/dre2n/dungeonsxl/player/DPlayers.java b/src/main/java/io/github/dre2n/dungeonsxl/player/DPlayers.java index a23a1b9b..c2992bd2 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/player/DPlayers.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/player/DPlayers.java @@ -29,6 +29,12 @@ public class DPlayers { private List dGlobalPlayers = new CopyOnWriteArrayList<>(); private List dSavePlayers = new CopyOnWriteArrayList<>(); + public DPlayers() { + for (Player player : Bukkit.getOnlinePlayers()) { + new DGlobalPlayer(player); + } + } + /** * @return the DGlobalPlayer which represents the player */