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

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

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

revision 1742 by torben, Sun Mar 18 10:45:00 2012 UTC revision 1744 by torben, Sun Mar 18 11:00:09 2012 UTC
# Line 127  public class TemplateCommand implements Line 127  public class TemplateCommand implements
127                                                  String element = elements[i].trim();                                                  String element = elements[i].trim();
128                                                  int val = Integer.parseInt( element );                                                  int val = Integer.parseInt( element );
129                                                                                                    
130                                                    if (val < 0 || val>255) {
131                                                            plugin.getLogger().info( "Template: invalid value on line " + lines + ": " + val );
132                                                            return null;
133                                                    }
134                                                  array[x][y][i] = val;                                                  array[x][y][i] = val;
135                                                                                                    
136                                          } catch (Exception e) {                                          } catch (Exception e) {
# Line 170  public class TemplateCommand implements Line 174  public class TemplateCommand implements
174                                          int y = loc.getBlockY() + j;                                          int y = loc.getBlockY() + j;
175                                          int z = loc.getBlockZ() + k;                                          int z = loc.getBlockZ() + k;
176                                                                                    
177                                          world.getBlockAt(x, y, z).setTypeId(  template[i][j][k] );                                          int type = template[i][j][k];
178                                            
179                                            
180                                            plugin.getLogger().info(  String.format(  "Setting typeid at %d,%d,%d  to %d", x,y,z, type)  );
181                                            
182                                            world.getBlockAt(x, y, z).setTypeId( type  );
183                                  }                                  }
184                          }                          }
185                  }                  }

Legend:
Removed from v.1742  
changed lines
  Added in v.1744

  ViewVC Help
Powered by ViewVC 1.1.20