9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-25 09:59:20 +00:00
This commit is contained in:
Xiao-MoMi
2022-10-27 16:52:32 +08:00
parent bf8cd96205
commit a75c2b119c
2 changed files with 5 additions and 1 deletions

View File

@@ -56,6 +56,7 @@ import org.bukkit.event.HandlerList;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.Nullable;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ThreadLocalRandom;
@@ -215,6 +216,9 @@ public class CropManager extends Function {
String id = customInterface.getItemID(item.getItemStack());
if (id == null) return;
if (id.contains("_stage_")) item.remove();
if (id.equals(BasicItemConfig.wetPot)) {
item.setItemStack(Objects.requireNonNull(customInterface.getItemStack(BasicItemConfig.dryPot)));
}
}
public void onWorldLoad(World world) {