|
@@ -68,20 +68,22 @@ public class mcExcavation {
|
|
Location loc = block.getLocation();
|
|
Location loc = block.getLocation();
|
|
ItemStack is = null;
|
|
ItemStack is = null;
|
|
Material mat = null;
|
|
Material mat = null;
|
|
- if(type == 2 && mcUsers.getProfile(player).getExcavationInt() > 250){
|
|
|
|
- //CHANCE TO GET EGGS
|
|
|
|
- if(mcLoadProperties.eggs == true && Math.random() * 100 > 99){
|
|
|
|
- mcUsers.getProfile(player).addExcavationGather(10);
|
|
|
|
- mat = Material.getMaterial(344);
|
|
|
|
- is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
|
|
- loc.getWorld().dropItemNaturally(loc, is);
|
|
|
|
- }
|
|
|
|
- //CHANCE TO GET APPLES
|
|
|
|
- if(mcLoadProperties.apples == true && Math.random() * 100 > 99){
|
|
|
|
- mcUsers.getProfile(player).addExcavationGather(10);
|
|
|
|
- mat = Material.getMaterial(260);
|
|
|
|
- is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
|
|
- loc.getWorld().dropItemNaturally(loc, is);
|
|
|
|
|
|
+ if(type == 2){
|
|
|
|
+ if(mcUsers.getProfile(player).getExcavationInt() > 250){
|
|
|
|
+ //CHANCE TO GET EGGS
|
|
|
|
+ if(mcLoadProperties.eggs == true && Math.random() * 100 > 99){
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(10 * mcLoadProperties.xpGainMultiplier);
|
|
|
|
+ mat = Material.getMaterial(344);
|
|
|
|
+ is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
|
|
+ loc.getWorld().dropItemNaturally(loc, is);
|
|
|
|
+ }
|
|
|
|
+ //CHANCE TO GET APPLES
|
|
|
|
+ if(mcLoadProperties.apples == true && Math.random() * 100 > 99){
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(10 * mcLoadProperties.xpGainMultiplier);
|
|
|
|
+ mat = Material.getMaterial(260);
|
|
|
|
+ is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
|
|
+ loc.getWorld().dropItemNaturally(loc, is);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//DIRT SAND OR GRAVEL
|
|
//DIRT SAND OR GRAVEL
|
|
@@ -90,7 +92,7 @@ public class mcExcavation {
|
|
if(mcUsers.getProfile(player).getExcavationInt() > 750){
|
|
if(mcUsers.getProfile(player).getExcavationInt() > 750){
|
|
//CHANCE TO GET CAKE
|
|
//CHANCE TO GET CAKE
|
|
if(mcLoadProperties.cake == true && Math.random() * 2000 > 1999){
|
|
if(mcLoadProperties.cake == true && Math.random() * 2000 > 1999){
|
|
- mcUsers.getProfile(player).addExcavationGather(300);
|
|
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(300 * mcLoadProperties.xpGainMultiplier);
|
|
mat = Material.getMaterial(354);
|
|
mat = Material.getMaterial(354);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
@@ -99,7 +101,7 @@ public class mcExcavation {
|
|
if(mcUsers.getProfile(player).getExcavationInt() > 350){
|
|
if(mcUsers.getProfile(player).getExcavationInt() > 350){
|
|
//CHANCE TO GET DIAMOND
|
|
//CHANCE TO GET DIAMOND
|
|
if(mcLoadProperties.diamond == true && Math.random() * 750 > 749){
|
|
if(mcLoadProperties.diamond == true && Math.random() * 750 > 749){
|
|
- mcUsers.getProfile(player).addExcavationGather(100);
|
|
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(100 * mcLoadProperties.xpGainMultiplier);
|
|
mat = Material.getMaterial(264);
|
|
mat = Material.getMaterial(264);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
@@ -108,7 +110,7 @@ public class mcExcavation {
|
|
if(mcUsers.getProfile(player).getExcavationInt() > 250){
|
|
if(mcUsers.getProfile(player).getExcavationInt() > 250){
|
|
//CHANCE TO GET YELLOW MUSIC
|
|
//CHANCE TO GET YELLOW MUSIC
|
|
if(mcLoadProperties.music == true && Math.random() * 2000 > 1999){
|
|
if(mcLoadProperties.music == true && Math.random() * 2000 > 1999){
|
|
- mcUsers.getProfile(player).addExcavationGather(300);
|
|
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(300 * mcLoadProperties.xpGainMultiplier);
|
|
mat = Material.getMaterial(2256);
|
|
mat = Material.getMaterial(2256);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
@@ -118,7 +120,7 @@ public class mcExcavation {
|
|
if(mcUsers.getProfile(player).getExcavationInt() > 350){
|
|
if(mcUsers.getProfile(player).getExcavationInt() > 350){
|
|
//CHANCE TO GET GREEN MUSIC
|
|
//CHANCE TO GET GREEN MUSIC
|
|
if(mcLoadProperties.music == true && Math.random() * 2000 > 1999){
|
|
if(mcLoadProperties.music == true && Math.random() * 2000 > 1999){
|
|
- mcUsers.getProfile(player).addExcavationGather(300);
|
|
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(300 * mcLoadProperties.xpGainMultiplier);
|
|
mat = Material.getMaterial(2257);
|
|
mat = Material.getMaterial(2257);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
@@ -129,31 +131,35 @@ public class mcExcavation {
|
|
if(type == 12){
|
|
if(type == 12){
|
|
//CHANCE TO GET GLOWSTONE
|
|
//CHANCE TO GET GLOWSTONE
|
|
if(mcLoadProperties.glowstone == true && mcUsers.getProfile(player).getExcavationInt() > 50 && Math.random() * 100 > 95){
|
|
if(mcLoadProperties.glowstone == true && mcUsers.getProfile(player).getExcavationInt() > 50 && Math.random() * 100 > 95){
|
|
- mcUsers.getProfile(player).addExcavationGather(8);
|
|
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(8 * mcLoadProperties.xpGainMultiplier);
|
|
mat = Material.getMaterial(348);
|
|
mat = Material.getMaterial(348);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
}
|
|
}
|
|
//CHANCE TO GET SLOWSAND
|
|
//CHANCE TO GET SLOWSAND
|
|
if(mcLoadProperties.slowsand == true && mcUsers.getProfile(player).getExcavationInt() > 650 && Math.random() * 200 > 199){
|
|
if(mcLoadProperties.slowsand == true && mcUsers.getProfile(player).getExcavationInt() > 650 && Math.random() * 200 > 199){
|
|
- mcUsers.getProfile(player).addExcavationGather(8);
|
|
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(8 * mcLoadProperties.xpGainMultiplier);
|
|
mat = Material.getMaterial(88);
|
|
mat = Material.getMaterial(88);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
}
|
|
}
|
|
- //CHANCE TO GET DIAMOND
|
|
|
|
- if(mcLoadProperties.diamond == true && mcUsers.getProfile(player).getExcavationInt() > 500 && Math.random() * 500 > 499){
|
|
|
|
- mcUsers.getProfile(player).addExcavationGather(100);
|
|
|
|
- mat = Material.getMaterial(264);
|
|
|
|
|
|
+ }
|
|
|
|
+ //GRASS OR DIRT
|
|
|
|
+ if(type == 2 || type == 3){
|
|
|
|
+ //CHANCE FOR SHROOMS
|
|
|
|
+ if(mcLoadProperties.mushrooms == true && mcUsers.getProfile(player).getExcavationInt() > 500 && Math.random() * 200 > 199){
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(8 * mcLoadProperties.xpGainMultiplier);
|
|
|
|
+ if(Math.random() * 10 > 5){
|
|
|
|
+ mat = Material.getMaterial(39);
|
|
|
|
+ } else {
|
|
|
|
+ mat = Material.getMaterial(40);
|
|
|
|
+ }
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
}
|
|
}
|
|
- }
|
|
|
|
- //GRASS OR DIRT
|
|
|
|
- if((type == 2 || type == 3) && mcUsers.getProfile(player).getExcavationInt() > 25){
|
|
|
|
//CHANCE TO GET GLOWSTONE
|
|
//CHANCE TO GET GLOWSTONE
|
|
- if(mcLoadProperties.glowstone == true && Math.random() * 100 > 95){
|
|
|
|
- mcUsers.getProfile(player).addExcavationGather(8);
|
|
|
|
|
|
+ if(mcLoadProperties.glowstone == true && mcUsers.getProfile(player).getExcavationInt() > 25 && Math.random() * 100 > 95){
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(8 * mcLoadProperties.xpGainMultiplier);
|
|
mat = Material.getMaterial(348);
|
|
mat = Material.getMaterial(348);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
@@ -163,7 +169,7 @@ public class mcExcavation {
|
|
if(type == 13){
|
|
if(type == 13){
|
|
//CHANCE TO GET NETHERRACK
|
|
//CHANCE TO GET NETHERRACK
|
|
if(mcLoadProperties.netherrack == true && mcUsers.getProfile(player).getExcavationInt() > 850 && Math.random() * 200 > 199){
|
|
if(mcLoadProperties.netherrack == true && mcUsers.getProfile(player).getExcavationInt() > 850 && Math.random() * 200 > 199){
|
|
- mcUsers.getProfile(player).addExcavationGather(3);
|
|
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(3 * mcLoadProperties.xpGainMultiplier);
|
|
mat = Material.getMaterial(87);
|
|
mat = Material.getMaterial(87);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
@@ -171,7 +177,7 @@ public class mcExcavation {
|
|
//CHANCE TO GET SULPHUR
|
|
//CHANCE TO GET SULPHUR
|
|
if(mcLoadProperties.sulphur == true && mcUsers.getProfile(player).getExcavationInt() > 75){
|
|
if(mcLoadProperties.sulphur == true && mcUsers.getProfile(player).getExcavationInt() > 75){
|
|
if(Math.random() * 10 > 9){
|
|
if(Math.random() * 10 > 9){
|
|
- mcUsers.getProfile(player).addExcavationGather(3);
|
|
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(3 * mcLoadProperties.xpGainMultiplier);
|
|
mat = Material.getMaterial(289);
|
|
mat = Material.getMaterial(289);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
@@ -180,7 +186,7 @@ public class mcExcavation {
|
|
//CHANCE TO GET BONES
|
|
//CHANCE TO GET BONES
|
|
if(mcLoadProperties.bones == true && mcUsers.getProfile(player).getExcavationInt() > 175){
|
|
if(mcLoadProperties.bones == true && mcUsers.getProfile(player).getExcavationInt() > 175){
|
|
if(Math.random() * 10 > 9){
|
|
if(Math.random() * 10 > 9){
|
|
- mcUsers.getProfile(player).addExcavationGather(3);
|
|
|
|
|
|
+ mcUsers.getProfile(player).addExcavationGather(3 * mcLoadProperties.xpGainMultiplier);
|
|
mat = Material.getMaterial(352);
|
|
mat = Material.getMaterial(352);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|
|
loc.getWorld().dropItemNaturally(loc, is);
|