mirror of
https://github.com/xzb23/Minecraft-Command-Permission-Control.git
synced 2026-11-24 17:55:25 +08:00
支持I18n/L10n
This commit is contained in:
6 files changed
+65
-24
No files matched your search
@@ -0,0 +1,29 @@
|
||||
package com.ataku.stopcheat;
|
||||
|
||||
import net.minecraft.client.resources.language.I18n;
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.fml.loading.FMLEnvironment;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class I18n_ {
|
||||
public static Map<String, String> i18nDic = new HashMap<>();
|
||||
|
||||
public static void init_(){
|
||||
if (FMLEnvironment.dist == Dist.DEDICATED_SERVER) {
|
||||
i18nDic.put("aza.stopcheat.warn.config.lan", "{} configuration unavailable, length error");
|
||||
i18nDic.put("aza.stopcheat.warn.config.stopindex", "{} configuration unavailable, args_STOPINDEX error, reset to 0");
|
||||
i18nDic.put("aza.stopcheat.log.intercept", "{} used {} command and was intercepted");
|
||||
i18nDic.put("aza.stopcheat.broadcast.cheat", "§cNo cheating allowed (>v0");
|
||||
i18nDic.put("aza.stopcheat.broadcast.reload", "Configuration reloaded");
|
||||
}else {
|
||||
i18nDic.put("aza.stopcheat.warn.config.lan", I18n.get("aza.stopcheat.warn.config.lan"));
|
||||
i18nDic.put("aza.stopcheat.warn.config.stopindex", I18n.get("aza.stopcheat.warn.config.stopindex"));
|
||||
i18nDic.put("aza.stopcheat.log.intercept", I18n.get("aza.stopcheat.log.intercept"));
|
||||
i18nDic.put("aza.stopcheat.broadcast.cheat", I18n.get("aza.stopcheat.broadcast.cheat"));
|
||||
i18nDic.put("aza.stopcheat.broadcast.reload", I18n.get("aza.stopcheat.broadcast.reload"));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user