Skip to content

Commit 4047045

Browse files
author
grely
authored
osfdgahd
1 parent 2b01498 commit 4047045

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/hexed/HexedMod.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,15 @@ public void init(){
143143
}
144144
}
145145
});
146-
146+
Events.on(GameOverEvent.class, event -> {endGame()});
147+
147148
Events.on(PlayerLeave.class, event -> {
148-
if(active() && event.player.team() != Team.derelict){
149-
killTiles(event.player.team());
150-
}
149+
Timer.schedule(() -> {
150+
boolean playerFound = Groups.player.any(player -> player.uuid().equals(event.player.uuid()));
151+
if (!playerFound && active() && leavingPlayer.team() != Team.derelict) {
152+
killTiles(leavingPlayer.team());
153+
}
154+
}, 180);
151155
});
152156

153157
Events.on(PlayerJoin.class, event -> {

0 commit comments

Comments
 (0)