9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-29 20:09:23 +00:00
Files
LeavesMC/leaves-server/minecraft-patches/features/0002-Leaves-Server-Config-And-Command.patch
Helvetica Volubi 2654bf5390 Fully rewrite I18n support (#545)
* feat: fully rewrite I18n support

support all language from https://minecraft.wiki/w/Language, format: zh_cn ,en_us etc.

* fix:fix up some bugs

* fix:fix up some bugs - 2

* Modify and reformat

* feat: Use URI instead of URL

rename LocalLangUtil to ServerI18nUtil

* feat: add pre-load status

* fix: fix some key name

* ???

* Add finishPreload for fixup

* Fix bugs, use slf4j logger

* feat: add I18n Leaves support

* fix

* move up

* tiny patch

* fix up logs

* refactor:fix up format

* feat: use version flag from server

---------

Co-authored-by: Lumine1909 <133463833+Lumine1909@users.noreply.github.com>
2025-06-24 11:29:11 -07:00

20 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: violetc <58360096+s-yh-china@users.noreply.github.com>
Date: Sat, 1 Feb 2025 14:21:05 +0800
Subject: [PATCH] Leaves Server Config And Command
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
index c22234df51a61954d1728b8406545f753dd8a3c2..d4775a33ee63a61e15ec3c1051261c01f2af28e0 100644
--- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -184,6 +184,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
+ org.leavesmc.leaves.LeavesConfig.init((java.io.File) options.valueOf("leaves-settings")); // Leaves - Server Config
+
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics // Leaves - down
this.setPvpAllowed(properties.pvp);