From ede8f512eeb64c695fb5b2ec3769aa1b6d446b4e Mon Sep 17 00:00:00 2001 From: Lixfel Date: Tue, 18 Jun 2019 11:45:42 +0200 Subject: [PATCH] Bugfixing & correcting time --- src/de/steamwar/realtime/Realtime.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/de/steamwar/realtime/Realtime.java b/src/de/steamwar/realtime/Realtime.java index 9ddfd85..2973c22 100644 --- a/src/de/steamwar/realtime/Realtime.java +++ b/src/de/steamwar/realtime/Realtime.java @@ -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); } }