2323import java .util .function .Predicate ;
2424
2525import static redart15 .commandly .command .CommandlyCommands .ReturnValues .*;
26- import static redart15 .commandly .CommandlyMod .MASK ;
2726
2827@ SuppressWarnings ("ALL" ) //cause this drives me nuts
2928public class CommandProtect implements CommandManager .CommandRegistry {
@@ -98,7 +97,7 @@ private static int chunks_protect(CommandSource source, World world, Predicate<B
9897 Block <?> block = world .getBlock (fx + x , y , fz + z );
9998 if (block == null ) continue ;
10099 if (treecapitator .test (block ) || veinmining .test (block )) {
101- world .setBlockMetadata (fx + x , y , fz + z , (1 << MASK ));
100+ world .setBlockMetadata (fx + x , y , fz + z , (1 << CommandlyMod . getMask () ));
102101 count_protected ++;
103102 }
104103 }
@@ -157,7 +156,7 @@ private static int radius_protect(
157156 throw new RuntimeException (e );
158157 }
159158
160- if ((int ) Math .floor (1.25 * Math .PI * Math .pow (radius , 3 )) > CommandlyMod .MAX_BLOCK_COUNT ) {
159+ if ((int ) Math .floor (1.25 * Math .PI * Math .pow (radius , 3 )) > CommandlyMod .getMaxBlockCount () ) {
161160 source .sendTranslatableMessage ("commadly.protected.tolarge" );
162161 return code (CANNOT );
163162 }
@@ -169,7 +168,7 @@ private static int radius_protect(
169168 Block <?> block = world .getBlock (fx + x , fy + y , fz + z );
170169 if (block == null ) continue ;
171170 if (treecapitator .test (block ) || veinmining .test (block )) {
172- world .setBlockMetadata (fx + x , fy + y , fz + z , (1 << MASK ));
171+ world .setBlockMetadata (fx + x , fy + y , fz + z , (1 << CommandlyMod . getMask () ));
173172 count_protected ++;
174173 }
175174 }
@@ -229,7 +228,7 @@ public static int point_protect(
229228 } catch (CommandSyntaxException e ) {
230229 throw new RuntimeException (e );
231230 }
232- if (Math .abs (fx - sx ) * Math .abs (fy - sy ) * Math .abs (fz - sz ) > CommandlyMod .MAX_BLOCK_COUNT ) {
231+ if (Math .abs (fx - sx ) * Math .abs (fy - sy ) * Math .abs (fz - sz ) > CommandlyMod .getMaxBlockCount () ) {
233232 source .sendTranslatableMessage ("commadly.protected.toolarge" );
234233 return code (CANNOT );
235234 }
@@ -241,7 +240,7 @@ public static int point_protect(
241240 Block <?> block = world .getBlock (x , y , z );
242241 if (block == null ) continue ;
243242 if (treecapitator .test (block ) || veinmining .test (block )) {
244- world .setBlockMetadata (x , y , z , (1 << MASK ));
243+ world .setBlockMetadata (x , y , z , (1 << CommandlyMod . getMask () ));
245244 count_protected ++;
246245 }
247246 }
0 commit comments