/[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 3140 by torben, Fri Nov 18 20:53:27 2016 UTC revision 3239 by torben, Wed Jul 18 07:59:05 2018 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                            
35                            //Material.WOOD,
36                            Material.ACACIA_WOOD,
37                            Material.BIRCH_WOOD,
38                            Material.DARK_OAK_WOOD,
39                            Material.JUNGLE_WOOD,
40                            Material.OAK_WOOD,
41                            Material.SPRUCE_WOOD,
42    
43                            Material.BEDROCK,
44                            Material.WATER,
45                            Material.SAND,
46                            Material.GRAVEL,
47                            Material.GOLD_ORE,
48                            Material.IRON_ORE,
49                            Material.COAL_ORE,
50                            
51                            //Material.LOG,
52                            Material.ACACIA_LOG,
53                            Material.BIRCH_LOG,
54                            Material.DARK_OAK_LOG,
55                            Material.JUNGLE_LOG,
56                            Material.OAK_LOG,
57                            Material.SPRUCE_LOG,
58                            //Material.LEAVES,
59                            Material.ACACIA_LEAVES,
60                            Material.BIRCH_LEAVES,
61                            Material.DARK_OAK_LEAVES,
62                            Material.JUNGLE_LEAVES,
63                            Material.OAK_LEAVES,
64                            Material.SPRUCE_LEAVES,
65                            
66                            Material.GLASS,
67                            Material.LAPIS_ORE,
68                            Material.LAPIS_BLOCK,
69                            Material.SANDSTONE,
70                            //Material.WOOL,
71                            Material.BLACK_WOOL,
72                            Material.WHITE_WOOL,
73                            Material.GRAY_WOOL,
74                            
75                            Material.GOLD_BLOCK,
76                            Material.IRON_BLOCK,
77                            Material.BRICK,
78                            Material.MOSSY_COBBLESTONE,
79                            Material.OBSIDIAN,
80                            Material.DIAMOND_ORE,
81                            Material.DIAMOND_BLOCK,
82                            Material.ICE,
83                            Material.SNOW,
84                            Material.CLAY,
85                            Material.NETHERRACK,
86                            Material.SOUL_SAND
87          };          };
88  //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} ;
89    
# Line 95  public class GeneralContractorCommands i Line 148  public class GeneralContractorCommands i
148                          }                                }      
149                          return true;                          return true;
150                  }                  }
151    
152                    if (label.equals("levelandfillarea") ) {
153                            if (validateLevelOrFill(player, label, args) ) {
154    
155                                    levelArea(player, loc, args);
156                                    fillArea(player, loc, args);                            
157                                    setSurface(player, loc, args);  
158    
159                            }
160                    }              
161                                    
162                  if ( label.equals("slopearea") ) {                  if ( label.equals("slopearea") ) {
163                          slopeArea(player, loc, args);                            slopeArea(player, loc, args);  
# Line 118  public class GeneralContractorCommands i Line 181  public class GeneralContractorCommands i
181                          }                          }
182                          return true;                          return true;
183                  }                  }
184    
185    
186                    
187                    
188                  return false;                  return false;
# Line 176  public class GeneralContractorCommands i Line 241  public class GeneralContractorCommands i
241                          return;                          return;
242                  }                  }
243    
244                  if (radius > 20) {                  if (radius > 25) {
245                          player.sendMessage("platform: radius may not exceed 20");                          player.sendMessage("platform: radius may not exceed 25");
246                          return;                          return;
247                  }                  }
248    
# Line 231  public class GeneralContractorCommands i Line 296  public class GeneralContractorCommands i
296                          return;                          return;
297                  }                  }
298    
299                  if (radius > 20) {                  if (radius > 25) {
300                          player.sendMessage("setsurface: radius may not exceed 20");                          player.sendMessage("setsurface: radius may not exceed 25");
301                          return;                          return;
302                  }                  }
303    
# Line 284  public class GeneralContractorCommands i Line 349  public class GeneralContractorCommands i
349                          return false;                          return false;
350                  }                  }
351    
352                  if (radius > 20) {                  if (radius > 25) {
353                          player.sendMessage(label + ": radius may not exceed 20");                          player.sendMessage(label + ": radius may not exceed 25");
354                          return false;                          return false;
355                  }                  }
356                                    
# Line 356  public class GeneralContractorCommands i Line 421  public class GeneralContractorCommands i
421    
422                  World world = loc.getWorld();                  World world = loc.getWorld();
423    
424                  int count = 0;                  
425                  for (int x=(playerX-radius); x<=(playerX+radius); x++) {                  for (int x=(playerX-radius); x<=(playerX+radius); x++) {
426                          for (int z=(playerZ-radius); z<=(playerZ+radius); z++) {                          for (int z=(playerZ-radius); z<=(playerZ+radius); z++) {
427    
428                                  int y_max = playerY+radius;                                  int y_max = playerY+radius;
429                                  //for (int y=playerY; y<=playerY+radius; y++) {                                  //for (int y=playerY; y<=playerY+radius; y++) {
430                                  for (int y=playerY; y<=y_max; y++) {                                  for (int y=playerY; y<=y_max; y++) {
431                                          count++;  
432                                          world.getBlockAt(x, y, z).setType(Material.AIR);                                          world.getBlockAt(x, y, z).setType(Material.AIR);
433                                                                                    
434                                  }                                  }
# Line 387  public class GeneralContractorCommands i Line 452  public class GeneralContractorCommands i
452    
453                  World world = loc.getWorld();                  World world = loc.getWorld();
454    
                 int count = 0;  
455                  for (int x=(playerX-radius); x<=(playerX+radius); x++) {                  for (int x=(playerX-radius); x<=(playerX+radius); x++) {
456                          for (int z=(playerZ-radius); z<=(playerZ+radius); z++) {                          for (int z=(playerZ-radius); z<=(playerZ+radius); z++) {
457    
458                                  //for (int y=playerY; y<=playerY+radius; y++) {                                  //for (int y=playerY; y<=playerY+radius; y++) {
459                                  for (int y=playerY; y<=Y_MAX; y++) {                                  for (int y=playerY; y<=Y_MAX; y++) {
                                         count++;  
460                                          world.getBlockAt(x, y, z).setType(Material.AIR);                                          world.getBlockAt(x, y, z).setType(Material.AIR);
461                                                                                    
462                                  }                                  }

Legend:
Removed from v.3140  
changed lines
  Added in v.3239

  ViewVC Help
Powered by ViewVC 1.1.20