Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e0d42cb1d3 | |||
| 559b2e089a | |||
| a07649d14d | |||
| 6aa709cf75 | |||
| 6a452799cc | |||
| e17a3f2033 |
@@ -85,7 +85,7 @@ jobs:
|
||||
echo "release_exists=${release_exists}" >> $GITHUB_ENV
|
||||
|
||||
- name: Check If Branch In Expectations
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name != 'pull_request' && env.flag_release == 'true'
|
||||
run: |
|
||||
if [[ "$GITHUB_REF_NAME" == ver/* ]] || [[ "$GITHUB_REF_NAME" == exp/* ]] || [[ "$GITHUB_REF_NAME" == dev/* ]]; then
|
||||
echo "Branch is in expected prefixes"
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ weightVersion=2.0.7
|
||||
release=2
|
||||
# 0 for skip release, 1 for pre-release, 2 for release
|
||||
|
||||
luminolRef=e605804fc5600aa41b18863543873bff65e125e9
|
||||
luminolRef=4553d0974982c54663b47c996ae5383371ff2db3
|
||||
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.caching=true
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
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
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+8
@@ -13,4 +13,12 @@ public class LanguageConfig implements IConfigModule {
|
||||
Please use the key from https://minecraft.wiki/w/Language
|
||||
Sample of format: en_us zh_cn zh_hk zh_tw""")
|
||||
public static String lang = "en_us";
|
||||
|
||||
@ConfigInfo(name = "full_blocking_load", comments = """
|
||||
Whether to allow blocking server loading when loading localized language.
|
||||
If you want only use your localized language to shown in your terminal,
|
||||
you need to enable it.
|
||||
|
||||
WARNING: This may slow down the startup speed!""")
|
||||
public static boolean full_blocking_load = false;
|
||||
}
|
||||
+13
-3
@@ -5,8 +5,8 @@ import fun.bm.lophine.command.counter.CounterCommand;
|
||||
import me.earthme.luminol.config.IConfigModule;
|
||||
import me.earthme.luminol.config.flags.ConfigClassInfo;
|
||||
import me.earthme.luminol.config.flags.ConfigInfo;
|
||||
import me.earthme.luminol.config.flags.DoNotLoad;
|
||||
import me.earthme.luminol.enums.EnumConfigCategory;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Set;
|
||||
@@ -19,13 +19,23 @@ public class WoolHopperCounterConfig implements IConfigModule {
|
||||
@ConfigInfo(name = "unlimited-speed")
|
||||
public static boolean unlimitedSpeed = false;
|
||||
|
||||
@DoNotLoad
|
||||
private static CounterCommand counterCommand = null;
|
||||
|
||||
@Override
|
||||
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
|
||||
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
|
||||
AtomicInteger count = new AtomicInteger();
|
||||
for (ServerLevel world : source.getServer().getAllLevels()) {
|
||||
world.regioniser.computeForAllRegions(unused -> {
|
||||
count.getAndIncrement();
|
||||
});
|
||||
world.regioniser.computeForAllRegions(unused -> count.getAndIncrement());
|
||||
}
|
||||
regionCount = count.get();
|
||||
savedRegionCount.set(0);
|
||||
|
||||
@@ -64,7 +64,11 @@ public class ServerI18nUtil {
|
||||
langJsonPath = "minecraft/lang/" + LanguageConfig.lang + ".json";
|
||||
lophineLangPath = "/assets/lophine/lang/" + LanguageConfig.lang + ".json";
|
||||
logger.info("Starting load language: {}", LanguageConfig.lang);
|
||||
preloadTask.thenAcceptAsync(v -> loadI18n(LanguageConfig.lang, 2));
|
||||
if (LanguageConfig.full_blocking_load) {
|
||||
loadI18n(LanguageConfig.lang, 2);
|
||||
} else {
|
||||
preloadTask.thenAcceptAsync(v -> loadI18n(LanguageConfig.lang, 2));
|
||||
}
|
||||
}
|
||||
|
||||
public static void preInit() {
|
||||
|
||||
+13
-2
@@ -28,6 +28,7 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.level.block.Mirror;
|
||||
import net.minecraft.world.level.block.Rotation;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.leavesmc.leaves.protocol.core.LeavesProtocol;
|
||||
import org.leavesmc.leaves.protocol.core.ProtocolHandler;
|
||||
import org.leavesmc.leaves.protocol.syncmatica.exchange.*;
|
||||
@@ -40,6 +41,8 @@ import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
import static fun.bm.lophine.LophineLogger.LOGGER;
|
||||
|
||||
@LeavesProtocol.Register(namespace = "syncmatica")
|
||||
public class CommunicationManager implements LeavesProtocol {
|
||||
|
||||
@@ -178,6 +181,10 @@ public class CommunicationManager implements LeavesProtocol {
|
||||
if (id.equals(PacketType.MODIFY_REQUEST.identifier)) {
|
||||
final UUID placementId = packetBuf.readUUID();
|
||||
final ModifyExchangeServer modifier = new ModifyExchangeServer(placementId, source);
|
||||
if (modifier.getPlacement() == null) {
|
||||
LOGGER.warn("Could not find placement for modify request {}", placementId);
|
||||
return;
|
||||
}
|
||||
startExchange(modifier);
|
||||
}
|
||||
}
|
||||
@@ -351,8 +358,12 @@ public class CommunicationManager implements LeavesProtocol {
|
||||
return downloadState.getOrDefault(syncmatic.getHash(), false);
|
||||
}
|
||||
|
||||
public static void setModifier(final @NotNull ServerPlacement syncmatic, final Exchange exchange) {
|
||||
modifyState.put(syncmatic.getHash(), exchange);
|
||||
public static void setModifier(final @NotNull ServerPlacement syncmatic, final @Nullable Exchange exchange) {
|
||||
if (exchange == null) {
|
||||
modifyState.remove(syncmatic.getHash());
|
||||
} else {
|
||||
modifyState.put(syncmatic.getHash(), exchange);
|
||||
}
|
||||
}
|
||||
|
||||
public static Exchange getModifier(final @NotNull ServerPlacement syncmatic) {
|
||||
|
||||
Reference in New Issue
Block a user