public void newRound() { if (getRound() > 1) { if (calculateWinner() == 0) { increaseRound(); setup(); }else{ if (calculateWinner() == 1) { getPlayers().forEach(p -> { if (getTeam(p) == 1) { getSes().leave(p, a -> { p.teleportAsync(API.getSpawn()).thenRun( () -> { main.kits.remove(p); main.match.remove(p); p.getInventory().clear(); p.setGameMode(GameMode.SURVIVAL); p.sendTitle("", "§aTebrikler Kazandınız!", 20, 40, 20); p.playSound(p.getLocation(), Sound.UI_TOAST_CHALLENGE_COMPLETE, 1, 1); }); }); }else if (getTeam(p) == 2) { getSes().leave(p, a -> { p.teleportAsync(API.getSpawn()).thenRun(() -> { main.kits.remove(p); main.match.remove(p); p.getInventory().clear(); p.setGameMode(GameMode.SURVIVAL); p.sendTitle("", "§cKaybettiniz!", 20, 40, 20); p.playSound(p.getLocation(), Sound.ENTITY_WITHER_SPAWN, 1, 1); }); }); } }); }else if (calculateWinner() == 2) { getPlayers().forEach(p -> { if (getTeam(p) == 2) { getSes().leave(p, a -> { p.teleportAsync(API.getSpawn()).thenRun( () -> { main.kits.remove(p); main.match.remove(p); p.getInventory().clear(); p.setGameMode(GameMode.SURVIVAL); p.sendTitle("", "§aTebrikler Kazandınız!", 20, 40, 20); p.playSound(p.getLocation(), Sound.UI_TOAST_CHALLENGE_COMPLETE, 1, 1); }); }); }else if (getTeam(p) == 1) { getSes().leave(p, a -> { p.teleportAsync(API.getSpawn()).thenRun(() -> { main.kits.remove(p); main.match.remove(p); p.getInventory().clear(); p.setGameMode(GameMode.SURVIVAL); p.sendTitle("", "§cKaybettiniz!", 20, 40, 20); p.playSound(p.getLocation(), Sound.ENTITY_WITHER_SPAWN, 1, 1); }); }); } }); } getSes().delete(); } }else{ increaseRound(); setup(); } }