Ver Fonte

Add permission check for green thumb effects during Green Terra ability

NuclearW há 12 anos atrás
pai
commit
7d826a0cdb

+ 2 - 1
src/main/java/com/gmail/nossr50/listeners/BlockListener.java

@@ -328,7 +328,8 @@ public class BlockListener implements Listener {
          *
          * We don't need to check permissions here because they've already been checked for the ability to even activate.
          */
-        if (profile.getAbilityMode(AbilityType.GREEN_TERRA) && BlockChecks.canMakeMossy(block)) {
+        // Except right here, which is for the Green Thumb activation, not the normal effect of Green Terra
+        if (profile.getAbilityMode(AbilityType.GREEN_TERRA) && BlockChecks.canMakeMossy(block) && Permissions.greenThumbBlocks(player)) {
             Herbalism.greenTerra(player, block);
         }
         else if (profile.getAbilityMode(AbilityType.GIGA_DRILL_BREAKER) && SkillTools.triggerCheck(player, block, AbilityType.GIGA_DRILL_BREAKER)) {