mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-09 12:20:30 +01:00
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:
parent
2641fb7e5c
commit
0684e3b34a
@ -200,7 +200,7 @@ public class DGroup {
|
|||||||
*/
|
*/
|
||||||
public Set<DGlobalPlayer> getDGlobalPlayers() {
|
public Set<DGlobalPlayer> getDGlobalPlayers() {
|
||||||
Set<DGlobalPlayer> players = new HashSet<>();
|
Set<DGlobalPlayer> players = new HashSet<>();
|
||||||
for (UUID uuid : this.players.getUniqueIds()) {
|
for (UUID uuid : this.players) {
|
||||||
players.add(dPlayers.getByUniqueId(uuid));
|
players.add(dPlayers.getByUniqueId(uuid));
|
||||||
}
|
}
|
||||||
return players;
|
return players;
|
||||||
@ -211,7 +211,7 @@ public class DGroup {
|
|||||||
*/
|
*/
|
||||||
public Set<DGamePlayer> getDGamePlayers() {
|
public Set<DGamePlayer> getDGamePlayers() {
|
||||||
Set<DGamePlayer> players = new HashSet<>();
|
Set<DGamePlayer> players = new HashSet<>();
|
||||||
for (UUID uuid : this.players.getUniqueIds()) {
|
for (UUID uuid : this.players) {
|
||||||
DGlobalPlayer dPlayer = dPlayers.getByUniqueId(uuid);
|
DGlobalPlayer dPlayer = dPlayers.getByUniqueId(uuid);
|
||||||
if (dPlayer instanceof DGamePlayer) {
|
if (dPlayer instanceof DGamePlayer) {
|
||||||
players.add((DGamePlayer) dPlayer);
|
players.add((DGamePlayer) dPlayer);
|
||||||
|
@ -420,7 +420,6 @@ public class DPlayerListener implements Listener {
|
|||||||
Game game = Game.getByWorld(player.getWorld());
|
Game game = Game.getByWorld(player.getWorld());
|
||||||
|
|
||||||
if (!(dPlayer instanceof DInstancePlayer)) {
|
if (!(dPlayer instanceof DInstancePlayer)) {
|
||||||
dPlayers.removePlayer(dPlayer);
|
|
||||||
if (dGroup != null) {
|
if (dGroup != null) {
|
||||||
dGroup.removePlayer(player);
|
dGroup.removePlayer(player);
|
||||||
}
|
}
|
||||||
@ -442,6 +441,8 @@ public class DPlayerListener implements Listener {
|
|||||||
} else if (dPlayer instanceof DEditPlayer) {
|
} else if (dPlayer instanceof DEditPlayer) {
|
||||||
((DEditPlayer) dPlayer).leave();
|
((DEditPlayer) dPlayer).leave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dPlayers.removePlayer(dPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
Loading…
Reference in New Issue
Block a user