9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-22 00:19:24 +00:00

2.0-pre-release-1

This commit is contained in:
Xiao-MoMi
2022-10-06 20:03:25 +08:00
parent 1bc99a34a0
commit 4140155650
27 changed files with 310 additions and 29 deletions

View File

@@ -24,6 +24,7 @@ import net.momirealms.customcrops.api.event.CropHarvestEvent;
import net.momirealms.customcrops.config.BasicItemConfig;
import net.momirealms.customcrops.config.MainConfig;
import net.momirealms.customcrops.config.SeasonConfig;
import net.momirealms.customcrops.config.SoundConfig;
import net.momirealms.customcrops.integrations.customplugin.CustomInterface;
import net.momirealms.customcrops.integrations.customplugin.HandlerP;
import net.momirealms.customcrops.integrations.customplugin.itemsadder.ItemsAdderFrameHandler;
@@ -48,6 +49,7 @@ import net.momirealms.customcrops.objects.fertilizer.Fertilizer;
import net.momirealms.customcrops.objects.fertilizer.QualityCrop;
import net.momirealms.customcrops.objects.fertilizer.RetainingSoil;
import net.momirealms.customcrops.objects.fertilizer.YieldIncreasing;
import net.momirealms.customcrops.utils.AdventureUtil;
import net.momirealms.customcrops.utils.ArmorStandUtil;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
@@ -269,6 +271,15 @@ public class CropManager extends Function {
ActionInterface[] actions = crop.getActions();
if (actions != null) performActions(actions, player);
if (SoundConfig.harvestCrop.isEnable()) {
AdventureUtil.playerSound(
player,
SoundConfig.harvestCrop.getSource(),
SoundConfig.harvestCrop.getKey(),
1,1
);
}
if (player.getGameMode() == GameMode.CREATIVE) return;
QualityLoot qualityLoot = crop.getQualityLoot();