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:
|
Changelog:
|
||||||
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code#
|
#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
|
Version 0.9.25
|
||||||
Fixed issue with anti-exploits and Herbalism
|
Fixed issue with anti-exploits and Herbalism
|
||||||
|
@ -58,8 +58,12 @@ public class mcBlockListener extends BlockListener {
|
|||||||
/*
|
/*
|
||||||
* HERBALISM
|
* 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);
|
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);
|
mcHerbalism.getInstance().greenTerraWheat(player, block, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,11 +145,12 @@ public class mcBlockListener extends BlockListener {
|
|||||||
/*
|
/*
|
||||||
* HERBALISM
|
* 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);
|
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
|
//Change the byte back when broken
|
||||||
if(block.getData() == 5)
|
if(block.getData() == 5)
|
||||||
block.setData((byte) 0);
|
block.setData((byte) 0);
|
||||||
|
@ -26,26 +26,30 @@ public class mcHerbalism {
|
|||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
public void greenTerraWheat(Player player, Block block, BlockBreakEvent event){
|
public void greenTerraWheat(Player player, Block block, BlockBreakEvent event){
|
||||||
event.setCancelled(true);
|
if(block.getType() == Material.WHEAT && block.getData() == (byte) 0x07){
|
||||||
PlayerProfile PP = mcUsers.getProfile(player.getName());
|
event.setCancelled(true);
|
||||||
Material mat = Material.getMaterial(296);
|
PlayerProfile PP = mcUsers.getProfile(player.getName());
|
||||||
Location loc = block.getLocation();
|
Material mat = Material.getMaterial(296);
|
||||||
ItemStack is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
Location loc = block.getLocation();
|
||||||
PP.addHerbalismGather(5 * mcLoadProperties.xpGainMultiplier);
|
ItemStack is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||||
loc.getWorld().dropItemNaturally(loc, is);
|
PP.addHerbalismGather(5 * mcLoadProperties.xpGainMultiplier);
|
||||||
herbalismProcCheck(block, player, event);
|
loc.getWorld().dropItemNaturally(loc, is);
|
||||||
herbalismProcCheck(block, player, event);
|
herbalismProcCheck(block, player, event);
|
||||||
block.setData((byte) 0x03);
|
herbalismProcCheck(block, player, event);
|
||||||
|
block.setData((byte) 0x03);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public void greenTerra(Player player, Block block){
|
public void greenTerra(Player player, Block block){
|
||||||
if(!hasSeeds(player) && block.getType() != Material.WHEAT)
|
if(block.getType() == Material.COBBLESTONE || block.getType() == Material.DIRT){
|
||||||
player.sendMessage("You need more seeds to spread Green Terra");
|
if(!hasSeeds(player))
|
||||||
if(hasSeeds(player) && block.getType() != Material.WHEAT){
|
player.sendMessage("You need more seeds to spread Green Terra");
|
||||||
removeSeeds(player);
|
if(hasSeeds(player) && block.getType() != Material.WHEAT){
|
||||||
if(block.getType() == Material.DIRT)
|
removeSeeds(player);
|
||||||
block.setType(Material.GRASS);
|
if(block.getType() == Material.DIRT)
|
||||||
if(block.getType() == Material.COBBLESTONE)
|
block.setType(Material.GRASS);
|
||||||
block.setType(Material.MOSSY_COBBLESTONE);
|
if(block.getType() == Material.COBBLESTONE)
|
||||||
|
block.setType(Material.MOSSY_COBBLESTONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public Boolean canBeGreenTerra(Block block){
|
public Boolean canBeGreenTerra(Block block){
|
||||||
@ -98,7 +102,7 @@ public class mcHerbalism {
|
|||||||
ticks++;
|
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**");
|
player.sendMessage(ChatColor.GREEN+"**GREEN TERRA ACTIVATED**");
|
||||||
for(Player y : pluginx.getServer().getOnlinePlayers()){
|
for(Player y : pluginx.getServer().getOnlinePlayers()){
|
||||||
if(y != null && y != player && mcm.getInstance().getDistance(player.getLocation(), y.getLocation()) < 10)
|
if(y != null && y != player && mcm.getInstance().getDistance(player.getLocation(), y.getLocation()) < 10)
|
||||||
@ -172,8 +176,7 @@ public class mcHerbalism {
|
|||||||
}
|
}
|
||||||
//Sugar Canes
|
//Sugar Canes
|
||||||
if(type == 83){
|
if(type == 83){
|
||||||
mat = Material.getMaterial(block.getTypeId());
|
is = new ItemStack(Material.SUGAR_CANE, 1, (byte)0, (byte)0);
|
||||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
|
||||||
if(player != null){
|
if(player != null){
|
||||||
if(Math.random() * 1000 <= PP.getHerbalismInt()){
|
if(Math.random() * 1000 <= PP.getHerbalismInt()){
|
||||||
loc.getWorld().dropItemNaturally(loc, is);
|
loc.getWorld().dropItemNaturally(loc, is);
|
||||||
|
@ -41,7 +41,7 @@ public class mcMining {
|
|||||||
ticks++;
|
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**");
|
player.sendMessage(ChatColor.GREEN+"**SUPER BREAKER ACTIVATED**");
|
||||||
for(Player y : pluginx.getServer().getOnlinePlayers()){
|
for(Player y : pluginx.getServer().getOnlinePlayers()){
|
||||||
if(y != null && y != player && mcm.getInstance().getDistance(player.getLocation(), y.getLocation()) < 10)
|
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(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().hoeReadinessCheck(player);
|
||||||
}
|
}
|
||||||
mcSkills.getInstance().abilityActivationCheck(player);
|
mcSkills.getInstance().abilityActivationCheck(player);
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
name: mcMMO
|
name: mcMMO
|
||||||
main: com.gmail.nossr50.mcMMO
|
main: com.gmail.nossr50.mcMMO
|
||||||
version: 0.9.25
|
version: 0.9.27
|
Loading…
Reference in New Issue
Block a user