9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2026-01-06 15:51:52 +00:00

Fixed some bugs

This commit is contained in:
XiaoMoMi
2024-09-10 21:21:48 +08:00
parent c00df1623c
commit 3e251ed47a
7 changed files with 27 additions and 14 deletions

View File

@@ -28,13 +28,17 @@ public class RealisticSeasonsProvider implements SeasonProvider {
@NotNull
@Override
public Season getSeason(@NotNull World world) {
return switch (SeasonsAPI.getInstance().getSeason(world)) {
case WINTER -> Season.WINTER;
case SPRING -> Season.SPRING;
case SUMMER -> Season.SUMMER;
case FALL -> Season.AUTUMN;
case DISABLED, RESTORE -> Season.DISABLE;
};
try {
return switch (SeasonsAPI.getInstance().getSeason(world)) {
case WINTER -> Season.WINTER;
case SPRING -> Season.SPRING;
case SUMMER -> Season.SUMMER;
case FALL -> Season.AUTUMN;
case DISABLED, RESTORE -> Season.DISABLE;
};
} catch (NullPointerException e) {
return Season.DISABLE;
}
}
@Override