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

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

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

revision 3138 by torben, Fri Nov 18 13:14:07 2016 UTC revision 3139 by torben, Fri Nov 18 20:50:34 2016 UTC
# Line 263  public class GeneralContractorCommands i Line 263  public class GeneralContractorCommands i
263                          for (int z=(playerZ-radius); z<=(playerZ+radius); z++) {                          for (int z=(playerZ-radius); z<=(playerZ+radius); z++) {
264                                  //int y = getGroundLevel(x,z) - 1;                                  //int y = getGroundLevel(x,z) - 1;
265                                  int y = world.getHighestBlockYAt(x, z) ;                                  int y = world.getHighestBlockYAt(x, z) ;
266                                    y -= 1;
267                                                                    
268                                  world.getBlockAt(x, y, z).setType(material);                                  world.getBlockAt(x, y, z).setType(material);
269                          }                          }
# Line 289  public class GeneralContractorCommands i Line 290  public class GeneralContractorCommands i
290                  }                  }
291                                    
292                  if (split.length == 2) {                  if (split.length == 2) {
293                          int id;                          Material material = Material.matchMaterial( split[1] );
294                          try {                          if (material == null) {
                                 id = Integer.parseInt( split[1] );  
                         } catch (Exception e) {  
295                                  player.sendMessage(label + ": id must be an integer");                                  player.sendMessage(label + ": id must be an integer");
296                                  return false;                                  return false;
297                          }                          }
298                          if ( id == 46) {                          if ( material == Material.TNT) {
299                                  player.sendMessage("Sorry dave, i can't do that");                                  player.sendMessage("Sorry dave, i can't do that");
300                                  return false;                                  return false;
301                          }                          }

Legend:
Removed from v.3138  
changed lines
  Added in v.3139

  ViewVC Help
Powered by ViewVC 1.1.20