mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Fixed Green Terra not working.
This commit is contained in:
parent
358c333c70
commit
5d55af8183
@ -229,9 +229,10 @@ public class mcBlockListener implements Listener {
|
||||
/*
|
||||
* ABILITY TRIGGER CHECKS
|
||||
*/
|
||||
if (PP.getGreenTerraMode() && Skills.triggerCheck(player, block, AbilityType.GREEN_TERRA)) {
|
||||
if (PP.getGreenTerraMode() && mcPermissions.getInstance().herbalismAbility(player)) {
|
||||
Herbalism.greenTerra(player, block);
|
||||
}
|
||||
|
||||
if (PP.getGigaDrillBreakerMode() && Skills.triggerCheck(player, block, AbilityType.GIGA_DRILL_BREAKER)) {
|
||||
if (LoadProperties.excavationRequiresShovel && ItemChecks.isShovel(inhand)) {
|
||||
event.setInstaBreak(true);
|
||||
|
@ -22,18 +22,18 @@ public class Herbalism
|
||||
public static void greenTerra(Player player, Block block){
|
||||
PlayerInventory inventory = player.getInventory();
|
||||
boolean hasSeeds = inventory.contains(Material.SEEDS);
|
||||
if(block.getType() == Material.COBBLESTONE || block.getType() == Material.DIRT || block.getType() == Material.SMOOTH_BRICK){
|
||||
if(block.getType().equals(Material.COBBLESTONE) || block.getType().equals(Material.DIRT) || block.getType().equals(Material.SMOOTH_BRICK)){
|
||||
if(!hasSeeds)
|
||||
player.sendMessage("You need more seeds to spread Green Terra");
|
||||
if(hasSeeds && block.getType() != Material.WHEAT)
|
||||
if(hasSeeds && !block.getType().equals(Material.WHEAT))
|
||||
{
|
||||
inventory.removeItem(new ItemStack(Material.SEEDS, 1));
|
||||
player.updateInventory();
|
||||
if(LoadProperties.enableSmoothToMossy && block.getType() == Material.SMOOTH_BRICK)
|
||||
block.setData((byte)1);
|
||||
if(LoadProperties.enableDirtToGrass && block.getType() == Material.DIRT)
|
||||
if(LoadProperties.enableSmoothToMossy && block.getType().equals(Material.SMOOTH_BRICK))
|
||||
block.setData((byte) 0x1);
|
||||
if(LoadProperties.enableDirtToGrass && block.getType().equals(Material.DIRT))
|
||||
block.setType(Material.GRASS);
|
||||
if(LoadProperties.enableCobbleToMossy && block.getType() == Material.COBBLESTONE)
|
||||
if(LoadProperties.enableCobbleToMossy && block.getType().equals(Material.COBBLESTONE))
|
||||
block.setType(Material.MOSSY_COBBLESTONE);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user