/[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 3133 by torben, Fri Nov 18 13:14:07 2016 UTC revision 3141 by torben, Fri Nov 18 21:12:47 2016 UTC
# Line 30  public class GeneralContractorCommands i Line 30  public class GeneralContractorCommands i
30                          Material.STONE,                          Material.STONE,
31                          Material.GRASS,                          Material.GRASS,
32                          Material.DIRT,                          Material.DIRT,
33                          Material.COBBLESTONE                          Material.COBBLESTONE,
34                            Material.WOOD,
35                            Material.BEDROCK,
36                            Material.WATER,
37                            Material.SAND,
38                            Material.GRAVEL,
39                            Material.GOLD_ORE,
40                            Material.IRON_ORE,
41                            Material.COAL_ORE,
42                            Material.LOG,
43                            Material.LEAVES,
44                            Material.GLASS,
45                            Material.LAPIS_ORE,
46                            Material.LAPIS_BLOCK,
47                            Material.SANDSTONE,
48                            Material.WOOL,
49                            Material.GOLD_BLOCK,
50                            Material.IRON_BLOCK,
51                            Material.BRICK,
52                            Material.MOSSY_COBBLESTONE,
53                            Material.OBSIDIAN,
54                            Material.DIAMOND_ORE,
55                            Material.DIAMOND_BLOCK,
56                            Material.ICE,
57                            Material.SNOW,
58                            Material.CLAY,
59                            Material.NETHERRACK,
60                            Material.SOUL_SAND
61          };          };
62  //4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 35, 41, 42, 43, 44, 45, 48, 49, 56, 57, 73, 74, 79, 80, 82} ;  //4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 35, 41, 42, 43, 44, 45, 48, 49, 56, 57, 73, 74, 79, 80, 82} ;
63    
# Line 183  public class GeneralContractorCommands i Line 210  public class GeneralContractorCommands i
210    
211                  Material material = Material.matchMaterial( split[1] );                  Material material = Material.matchMaterial( split[1] );
212                  if (material == null) {                  if (material == null) {
213                          player.sendMessage("platform: blockid must be an integer");                          player.sendMessage("platform: unknown material: " + split[1] );
214                          return;                          return;
215                  }                  }
216  /*  /*
# Line 238  public class GeneralContractorCommands i Line 265  public class GeneralContractorCommands i
265    
266                  Material material = Material.matchMaterial( split[1] );                  Material material = Material.matchMaterial( split[1] );
267                  if (material == null) {                  if (material == null) {
268                          player.sendMessage("platform: blockid must be an integer");                          player.sendMessage("setsurface: unknown material: " + split[1] );
269                          return;                          return;
270                  }                  }
271    
# Line 263  public class GeneralContractorCommands i Line 290  public class GeneralContractorCommands i
290                          for (int z=(playerZ-radius); z<=(playerZ+radius); z++) {                          for (int z=(playerZ-radius); z<=(playerZ+radius); z++) {
291                                  //int y = getGroundLevel(x,z) - 1;                                  //int y = getGroundLevel(x,z) - 1;
292                                  int y = world.getHighestBlockYAt(x, z) ;                                  int y = world.getHighestBlockYAt(x, z) ;
293                                    y -= 1;
294                                                                    
295                                  world.getBlockAt(x, y, z).setType(material);                                  world.getBlockAt(x, y, z).setType(material);
296                          }                          }
# Line 289  public class GeneralContractorCommands i Line 317  public class GeneralContractorCommands i
317                  }                  }
318                                    
319                  if (split.length == 2) {                  if (split.length == 2) {
320                          int id;                          Material material = Material.matchMaterial( split[1] );
321                          try {                          if (material == null) {
322                                  id = Integer.parseInt( split[1] );                                  player.sendMessage(label + ": unknown material: " + split[1] );
                         } catch (Exception e) {  
                                 player.sendMessage(label + ": id must be an integer");  
323                                  return false;                                  return false;
324                          }                          }
325                          if ( id == 46) {                          if ( material == Material.TNT) {
326                                  player.sendMessage("Sorry dave, i can't do that");                                  player.sendMessage("Sorry dave, i can't do that");
327                                  return false;                                  return false;
328                          }                          }

Legend:
Removed from v.3133  
changed lines
  Added in v.3141

  ViewVC Help
Powered by ViewVC 1.1.20