SteamWar/RealTime
Archiviert
13
0

Bugfixing & correcting time

Dieser Commit ist enthalten in:
Lixfel 2019-06-18 11:45:42 +02:00
Ursprung aa7fbe8b76
Commit ede8f512ee

Datei anzeigen

@ -11,13 +11,12 @@ public class Realtime extends JavaPlugin {
@Override
public void onEnable(){
final Calendar cal = Calendar.getInstance();
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, () -> {
Date time = cal.getTime();
long l = time.getHours() * 100 + (long)(time.getMinutes() * 1.166666666666667);
Date time = Calendar.getInstance().getTime();
long l = time.getHours() * 1000 + (long)(time.getMinutes() * 16.66666666666667) + (long)(time.getSeconds() * 0.1666666666666667) - 6000;
for(World w : Bukkit.getWorlds()){
w.setTime(l);
}
}, 1200, 1200);
}, 0, 600);
}
}