コード例 #1
0
 public static void possibleClose() {
   if (watchers.length > 0) {
     for (DaytimeWatcher dw : watchers) {
       dw.close();
     }
     watchers = new DaytimeWatcher[0];
     index = 0;
   }
 }
コード例 #2
0
 private static void createNewWatchers() {
   World[] worlds = ModLoader.getMinecraftServerInstance().worldServers;
   if (worlds.length > 0) {
     for (DaytimeWatcher dw : watchers) {
       dw.close();
     }
     watchers = new DaytimeWatcher[worlds.length];
     for (int i = 0; i < worlds.length; i++) {
       watchers[i] = new DaytimeWatcher(worlds[i]);
     }
     index = 0;
   }
 }