perf: some perform update && update Gradle wrapper to version 9.4.1
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
+13
-3
@@ -5,8 +5,8 @@ import fun.bm.lophine.command.counter.CounterCommand;
|
|||||||
import me.earthme.luminol.config.IConfigModule;
|
import me.earthme.luminol.config.IConfigModule;
|
||||||
import me.earthme.luminol.config.flags.ConfigClassInfo;
|
import me.earthme.luminol.config.flags.ConfigClassInfo;
|
||||||
import me.earthme.luminol.config.flags.ConfigInfo;
|
import me.earthme.luminol.config.flags.ConfigInfo;
|
||||||
|
import me.earthme.luminol.config.flags.DoNotLoad;
|
||||||
import me.earthme.luminol.enums.EnumConfigCategory;
|
import me.earthme.luminol.enums.EnumConfigCategory;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -19,13 +19,23 @@ public class WoolHopperCounterConfig implements IConfigModule {
|
|||||||
@ConfigInfo(name = "unlimited-speed")
|
@ConfigInfo(name = "unlimited-speed")
|
||||||
public static boolean unlimitedSpeed = false;
|
public static boolean unlimitedSpeed = false;
|
||||||
|
|
||||||
|
@DoNotLoad
|
||||||
|
private static CounterCommand counterCommand = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoaded(CommentedFileConfig configInstance, @Nullable Set<Exception> exs) {
|
public void onLoaded(CommentedFileConfig configInstance, @Nullable Set<Exception> exs) {
|
||||||
if (enabled) new CounterCommand().register();
|
if (enabled) {
|
||||||
|
if (counterCommand == null) {
|
||||||
|
counterCommand = new CounterCommand();
|
||||||
|
}
|
||||||
|
counterCommand.register();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUnloaded(CommentedFileConfig configInstance) {
|
public void onUnloaded(CommentedFileConfig configInstance) {
|
||||||
Bukkit.getCommandMap().getKnownCommands().remove("luminol:tpsbar");
|
if (counterCommand != null) {
|
||||||
|
counterCommand.unregister();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,9 +30,7 @@ public class SaveAllUtil {
|
|||||||
// we need to count how many regions we need to save
|
// we need to count how many regions we need to save
|
||||||
AtomicInteger count = new AtomicInteger();
|
AtomicInteger count = new AtomicInteger();
|
||||||
for (ServerLevel world : source.getServer().getAllLevels()) {
|
for (ServerLevel world : source.getServer().getAllLevels()) {
|
||||||
world.regioniser.computeForAllRegions(unused -> {
|
world.regioniser.computeForAllRegions(unused -> count.getAndIncrement());
|
||||||
count.getAndIncrement();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
regionCount = count.get();
|
regionCount = count.get();
|
||||||
savedRegionCount.set(0);
|
savedRegionCount.set(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user