mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
You can now disable Green Thumb for specific crops (the auto replanting) in config.yml
This commit is contained in:
parent
735a90fb35
commit
713b0619c3
@ -1,6 +1,7 @@
|
|||||||
Version 2.1.175
|
Version 2.1.175
|
||||||
Fixed a bug where mcMMO would occasionally give a 65 item stack from a double smelt on a furnace
|
Fixed a bug where mcMMO would occasionally give a 65 item stack from a double smelt on a furnace
|
||||||
Fixed a bug where arrows could be duped when fired from a crossbow with piercing enchantment
|
Fixed a bug where arrows could be duped when fired from a crossbow with piercing enchantment
|
||||||
|
Added setting to enable or disable Green Thumb automatically replanting crops per crop to config.yml under 'Green_Thumb_Replanting_Crops' section
|
||||||
|
|
||||||
Version 2.1.174
|
Version 2.1.174
|
||||||
Some legacy color codes in our locale file were swapped to &-code equivalents (thanks ViaSnake)
|
Some legacy color codes in our locale file were swapped to &-code equivalents (thanks ViaSnake)
|
||||||
|
@ -9,6 +9,7 @@ import com.gmail.nossr50.util.text.StringUtils;
|
|||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -597,4 +598,7 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public int getPowerLevelUpBroadcastRadius() { return config.getInt("General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Broadcast_Targets.Distance_Restrictions.Restricted_Radius", 100); }
|
public int getPowerLevelUpBroadcastRadius() { return config.getInt("General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Broadcast_Targets.Distance_Restrictions.Restricted_Radius", 100); }
|
||||||
public int getPowerLevelUpBroadcastInterval() { return config.getInt("General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Milestone_Interval", 100); }
|
public int getPowerLevelUpBroadcastInterval() { return config.getInt("General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Milestone_Interval", 100); }
|
||||||
|
|
||||||
|
public boolean isGreenThumbReplantableCrop(@NotNull Material material) {
|
||||||
|
return config.getBoolean("Green_Thumb_Replanting_Crops." + StringUtils.getCapitalized(material.toString()), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,10 +182,12 @@ public class HerbalismManager extends SkillManager {
|
|||||||
|
|
||||||
//TODO: The design of Green Terra needs to change, this is a mess
|
//TODO: The design of Green Terra needs to change, this is a mess
|
||||||
if(Permissions.greenThumbPlant(getPlayer(), originalBreak.getType())) {
|
if(Permissions.greenThumbPlant(getPlayer(), originalBreak.getType())) {
|
||||||
|
if(Config.getInstance().isGreenThumbReplantableCrop(originalBreak.getType())) {
|
||||||
if(!getPlayer().isSneaking()) {
|
if(!getPlayer().isSneaking()) {
|
||||||
greenThumbActivated = processGreenThumbPlants(originalBreak, blockBreakEvent, isGreenTerraActive());
|
greenThumbActivated = processGreenThumbPlants(originalBreak, blockBreakEvent, isGreenTerraActive());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//When replanting a immature crop we cancel the block break event and back out
|
//When replanting a immature crop we cancel the block break event and back out
|
||||||
if(greenThumbActivated) {
|
if(greenThumbActivated) {
|
||||||
|
@ -451,6 +451,14 @@ Skills:
|
|||||||
Tree_Feller_Sounds: true
|
Tree_Feller_Sounds: true
|
||||||
Level_Cap: 0
|
Level_Cap: 0
|
||||||
|
|
||||||
|
# Disable or Enable the Green Thumb auto replant feature for specific crops, use the name of the block not the crop itemstack
|
||||||
|
Green_Thumb_Replanting_Crops:
|
||||||
|
Carrots: true
|
||||||
|
Wheat: true
|
||||||
|
Nether_Wart: true
|
||||||
|
Potatoes: true
|
||||||
|
Beetroots: true
|
||||||
|
Cocoa: true
|
||||||
#
|
#
|
||||||
# Settings for Double Drops
|
# Settings for Double Drops
|
||||||
###
|
###
|
||||||
|
Loading…
Reference in New Issue
Block a user