9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-28 03:19:15 +00:00
This commit is contained in:
Xiao-MoMi
2022-08-21 22:25:02 +08:00
parent 14f5af297e
commit aa8be827d7
40 changed files with 1991 additions and 864 deletions

View File

@@ -82,8 +82,11 @@ public class SeasonManager{
*/
public void getSeason(World world) {
if (ConfigReader.Config.realisticSeason){
SEASON.put(world.getName(), RealisticSeason.getSeason(world));
}else {
Bukkit.getScheduler().runTaskLater(CustomCrops.plugin, ()->{
SEASON.put(world.getName(), RealisticSeason.getSeason(world));
},60);
}
else {
int season = (int) ((world.getFullTime() / 24000L) % (ConfigReader.Season.duration * 4)) / ConfigReader.Season.duration;
switch (season) {
case 0 -> SEASON.put(world.getName(), "spring");