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

date season commands

This commit is contained in:
XiaoMoMi
2024-09-01 22:47:38 +08:00
parent 11a6e803d4
commit ab6d8527ec
13 changed files with 401 additions and 8 deletions

View File

@@ -101,7 +101,7 @@ public class SynchronizedCompoundMap {
listJoiner.add(tag2.getValue().toString());
}
}
tagValue = tag.getName() + "[" + listJoiner + "]";
tagValue = "[" + listJoiner + "]";
}
case TAG_COMPOUND -> tagValue = compoundMapToString(tag.getName(), (CompoundMap) tag.getValue());
default -> {

View File

@@ -203,7 +203,9 @@ public class CustomCropsWorldImpl<W> implements CustomCropsWorld<W> {
saveLazyChunks();
saveLazyRegions();
if (isANewDay()) {
updateSeasonAndDate();
if (setting().autoSeasonChange()) {
updateSeasonAndDate();
}
}
if (setting().enableScheduler()) {
tickChunks();

View File

@@ -18,6 +18,7 @@
package net.momirealms.customcrops.api.core.world;
import net.momirealms.customcrops.api.core.world.adaptor.WorldAdaptor;
import net.momirealms.customcrops.api.integration.SeasonProvider;
import net.momirealms.customcrops.common.plugin.feature.Reloadable;
import org.bukkit.World;
@@ -26,6 +27,8 @@ import java.util.Set;
public interface WorldManager extends Reloadable {
SeasonProvider seasonProvider();
Season getSeason(World world);
int getDate(World world);