added build automization

This commit is contained in:
2023-10-03 18:35:35 +02:00
parent e8252d1a60
commit f0c2ce71c7
11 changed files with 405 additions and 400 deletions

View File

@@ -0,0 +1,22 @@
package de.steev.bm.changes.env;
import org.bukkit.World;
public class weather {
static long lastThunder = 0;
long delay = 24000;
private static boolean isThunder(World world) {
return world.getThunderDuration() > 0;
}
public static void changeWeather(World world) {
if(isThunder(world)) {
if(lastThunder + 24000 > world.getFullTime()) {
world.setClearWeatherDuration(1000);
}else {
lastThunder = world.getFullTime();
}
}
}
}