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

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

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

revision 1478 by torben, Thu May 26 18:32:20 2011 UTC revision 1480 by torben, Thu May 26 18:57:50 2011 UTC
# Line 30  public class EternalDayCommand implement Line 30  public class EternalDayCommand implement
30                    
31          @Override          @Override
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
34                    System.out.println("world count " + worlds.size());
35    
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 52  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.1478  
changed lines
  Added in v.1480

  ViewVC Help
Powered by ViewVC 1.1.20