/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/EternalDayCommand.java
ViewVC logotype

Diff of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/EternalDayCommand.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1479 by torben, Thu May 26 18:55:45 2011 UTC revision 1480 by torben, Thu May 26 18:57:50 2011 UTC
# Line 32  public class EternalDayCommand implement Line 32  public class EternalDayCommand implement
32          public boolean onCommand(final CommandSender sender, Command command, String label, String[] args) {          public boolean onCommand(final CommandSender sender, Command command, String label, String[] args) {
33                  //debug                  //debug
34                  System.out.println("world count " + worlds.size());                  System.out.println("world count " + worlds.size());
35                  for (World world : worlds) {  
                         System.out.println(" >" + world.getName() + " : " + world.getTime() );  
                 }  
36                                    
37                  if (taskId == -1) {                  if (taskId == -1) {
38                          taskId = server.getScheduler().scheduleSyncRepeatingTask(plugin, new EternalDayRunner(), 2*20, 60*20);                          taskId = server.getScheduler().scheduleSyncRepeatingTask(plugin, new EternalDayRunner(), 2*20, 60*20);
# Line 56  public class EternalDayCommand implement Line 54  public class EternalDayCommand implement
54                  public void run() {                  public void run() {
55                          for(World world : worlds) {                          for(World world : worlds) {
56                                  if (world.getTime() > 12000) {                                  if (world.getTime() > 12000) {
57                                            System.out.println(" >" + world.getName() + " : " + world.getTime() );
58                                          world.setTime(0);                                          world.setTime(0);
59                                          server.getScheduler().scheduleSyncDelayedTask(plugin, new MessageBroadcaster(server, ChatColor.YELLOW + "Eternalday has extended the period of light once again!"));                                          server.getScheduler().scheduleSyncDelayedTask(plugin, new MessageBroadcaster(server, ChatColor.YELLOW + "Eternalday has extended the period of light once again!"));
60                                  }                                                                }                              

Legend:
Removed from v.1479  
changed lines
  Added in v.1480

  ViewVC Help
Powered by ViewVC 1.1.20