mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
0.9.27
This commit is contained in:
parent
7d67e68cd6
commit
eccef7d206
@ -1,5 +1,13 @@
|
||||
Changelog:
|
||||
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code#
|
||||
Version 0.9.27
|
||||
Fixed Herbalism not properly receiving Triple Drops from Green Terra
|
||||
Fixed Herbalism not handing out any XP outside of Green Terra
|
||||
Fixed Herbalism asking for seeds on things that did not require it
|
||||
|
||||
Version 0.9.26
|
||||
Fixed Green Terra going off without readiness
|
||||
Fixed Hoe trying to ready when tilling Grass
|
||||
|
||||
Version 0.9.25
|
||||
Fixed issue with anti-exploits and Herbalism
|
||||
|
@ -58,8 +58,12 @@ public class mcBlockListener extends BlockListener {
|
||||
/*
|
||||
* HERBALISM
|
||||
*/
|
||||
if(mcPermissions.getInstance().herbalismAbility(player)&& PP.getGreenTerraMode() && block.getTypeId() == 59 && block.getData() == (byte) 0x07){
|
||||
if(PP.getHoePreparationMode() && mcPermissions.getInstance().herbalismAbility(player) && block.getTypeId() == 59 && block.getData() == (byte) 0x07){
|
||||
mcHerbalism.getInstance().greenTerraCheck(player, block, plugin);
|
||||
}
|
||||
//Wheat && Triple drops
|
||||
if(PP.getGreenTerraMode() && mcHerbalism.getInstance().canBeGreenTerra(block)){
|
||||
mcHerbalism.getInstance().herbalismProcCheck(block, player, event);
|
||||
mcHerbalism.getInstance().greenTerraWheat(player, block, event);
|
||||
}
|
||||
|
||||
@ -141,11 +145,12 @@ public class mcBlockListener extends BlockListener {
|
||||
/*
|
||||
* HERBALISM
|
||||
*/
|
||||
if(mcPermissions.getInstance().herbalism(player) && mcHerbalism.getInstance().canBeGreenTerra(block)){
|
||||
if(PP.getHoePreparationMode() && mcPermissions.getInstance().herbalism(player) && mcHerbalism.getInstance().canBeGreenTerra(block)){
|
||||
mcHerbalism.getInstance().greenTerraCheck(player, block, plugin);
|
||||
if(block.getData() != (byte) 5)
|
||||
mcHerbalism.getInstance().herbalismProcCheck(block, player, event);
|
||||
}
|
||||
if(mcPermissions.getInstance().herbalism(player) && block.getData() != (byte) 5)
|
||||
mcHerbalism.getInstance().herbalismProcCheck(block, player, event);
|
||||
|
||||
//Change the byte back when broken
|
||||
if(block.getData() == 5)
|
||||
block.setData((byte) 0);
|
||||
|
@ -26,6 +26,7 @@ public class mcHerbalism {
|
||||
return instance;
|
||||
}
|
||||
public void greenTerraWheat(Player player, Block block, BlockBreakEvent event){
|
||||
if(block.getType() == Material.WHEAT && block.getData() == (byte) 0x07){
|
||||
event.setCancelled(true);
|
||||
PlayerProfile PP = mcUsers.getProfile(player.getName());
|
||||
Material mat = Material.getMaterial(296);
|
||||
@ -37,8 +38,10 @@ public class mcHerbalism {
|
||||
herbalismProcCheck(block, player, event);
|
||||
block.setData((byte) 0x03);
|
||||
}
|
||||
}
|
||||
public void greenTerra(Player player, Block block){
|
||||
if(!hasSeeds(player) && block.getType() != Material.WHEAT)
|
||||
if(block.getType() == Material.COBBLESTONE || block.getType() == Material.DIRT){
|
||||
if(!hasSeeds(player))
|
||||
player.sendMessage("You need more seeds to spread Green Terra");
|
||||
if(hasSeeds(player) && block.getType() != Material.WHEAT){
|
||||
removeSeeds(player);
|
||||
@ -48,6 +51,7 @@ public class mcHerbalism {
|
||||
block.setType(Material.MOSSY_COBBLESTONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
public Boolean canBeGreenTerra(Block block){
|
||||
int t = block.getTypeId();
|
||||
if(t == 4 || t == 3 || t == 59 || t == 81 || t == 83 || t == 91 || t == 86 || t == 39 || t == 46 || t == 37 || t == 38){
|
||||
@ -98,7 +102,7 @@ public class mcHerbalism {
|
||||
ticks++;
|
||||
}
|
||||
|
||||
if(!PP.getGreenTerraMode() && PP.getGreenTerraCooldown() == 0){
|
||||
if(!PP.getGreenTerraMode() && mcSkills.getInstance().cooldownOver(player, PP.getGreenTerraDeactivatedTimeStamp(), mcLoadProperties.greenTerraCooldown)){
|
||||
player.sendMessage(ChatColor.GREEN+"**GREEN TERRA ACTIVATED**");
|
||||
for(Player y : pluginx.getServer().getOnlinePlayers()){
|
||||
if(y != null && y != player && mcm.getInstance().getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
@ -172,8 +176,7 @@ public class mcHerbalism {
|
||||
}
|
||||
//Sugar Canes
|
||||
if(type == 83){
|
||||
mat = Material.getMaterial(block.getTypeId());
|
||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||
is = new ItemStack(Material.SUGAR_CANE, 1, (byte)0, (byte)0);
|
||||
if(player != null){
|
||||
if(Math.random() * 1000 <= PP.getHerbalismInt()){
|
||||
loc.getWorld().dropItemNaturally(loc, is);
|
||||
|
@ -41,7 +41,7 @@ public class mcMining {
|
||||
ticks++;
|
||||
}
|
||||
|
||||
if(!PP.getSuperBreakerMode() && PP.getSuperBreakerCooldown() == 0){
|
||||
if(!PP.getSuperBreakerMode() && mcSkills.getInstance().cooldownOver(player, PP.getSuperBreakerDeactivatedTimeStamp(), mcLoadProperties.superBreakerCooldown)){
|
||||
player.sendMessage(ChatColor.GREEN+"**SUPER BREAKER ACTIVATED**");
|
||||
for(Player y : pluginx.getServer().getOnlinePlayers()){
|
||||
if(y != null && y != player && mcm.getInstance().getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||
|
@ -109,7 +109,7 @@ public class mcPlayerListener extends PlayerListener {
|
||||
|
||||
if(mcm.getInstance().abilityBlockCheck(block))
|
||||
{
|
||||
if(block != null && mcm.getInstance().isHoe(player.getItemInHand()) && block.getTypeId() != 3){
|
||||
if(block != null && mcm.getInstance().isHoe(player.getItemInHand()) && block.getTypeId() != 3 && block.getTypeId() != 2 && block.getTypeId() != 60){
|
||||
mcSkills.getInstance().hoeReadinessCheck(player);
|
||||
}
|
||||
mcSkills.getInstance().abilityActivationCheck(player);
|
||||
|
@ -1,3 +1,3 @@
|
||||
name: mcMMO
|
||||
main: com.gmail.nossr50.mcMMO
|
||||
version: 0.9.25
|
||||
version: 0.9.27
|
Loading…
Reference in New Issue
Block a user