Fixed that end signs didn't work when the player quit the server while being in a dungeon before; resolves #594

This commit is contained in:
Daniel Saukel 2019-06-18 00:16:13 +02:00
parent 2641fb7e5c
commit 0684e3b34a
2 changed files with 4 additions and 3 deletions

View File

@ -200,7 +200,7 @@ public class DGroup {
*/
public Set<DGlobalPlayer> getDGlobalPlayers() {
Set<DGlobalPlayer> players = new HashSet<>();
for (UUID uuid : this.players.getUniqueIds()) {
for (UUID uuid : this.players) {
players.add(dPlayers.getByUniqueId(uuid));
}
return players;
@ -211,7 +211,7 @@ public class DGroup {
*/
public Set<DGamePlayer> getDGamePlayers() {
Set<DGamePlayer> players = new HashSet<>();
for (UUID uuid : this.players.getUniqueIds()) {
for (UUID uuid : this.players) {
DGlobalPlayer dPlayer = dPlayers.getByUniqueId(uuid);
if (dPlayer instanceof DGamePlayer) {
players.add((DGamePlayer) dPlayer);

View File

@ -420,7 +420,6 @@ public class DPlayerListener implements Listener {
Game game = Game.getByWorld(player.getWorld());
if (!(dPlayer instanceof DInstancePlayer)) {
dPlayers.removePlayer(dPlayer);
if (dGroup != null) {
dGroup.removePlayer(player);
}
@ -442,6 +441,8 @@ public class DPlayerListener implements Listener {
} else if (dPlayer instanceof DEditPlayer) {
((DEditPlayer) dPlayer).leave();
}
dPlayers.removePlayer(dPlayer);
}
@EventHandler