Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BungeeCord.getInstance().getScheduler().schedule(this, new Runnable() {
- @SuppressWarnings("deprecation")
- @Override
- public void run() {
- String date = new SimpleDateFormat("Hm").format(new Date(System.currentTimeMillis()));
- if(date.toString().equalsIgnoreCase("0000") || date.toString().equalsIgnoreCase("000") || date.toString().equalsIgnoreCase("00") || date.toString().equalsIgnoreCase("0")) {
- for (ProxiedPlayer pls : BungeeCord.getInstance().getPlayers()) {
- pls.disconnect("§c- Serveur en cours de redémarrage... -\n§cMerci de vous reconnecter dans 5secondes...");
- }
- restartServer();
- }
- }
- }, 0, 1, TimeUnit.SECONDS);
Advertisement
Add Comment
Please, Sign In to add comment