清理:移除未使用代码与翻译键,更新文档版本 (26.9.17)
This commit is contained in:
1 parent
3461f996dc
commit
5eeab209f5
11 files changed
+13
-18
No files matched your search
+1
-1
@@ -10,7 +10,7 @@ import iridium.hat as hat
|
||||
import iridium.head as head
|
||||
import iridium.join_tip as join_tip
|
||||
import iridium.share as share
|
||||
from iridium.config import Config, apply_config, load_config
|
||||
from iridium.config import apply_config, load_config
|
||||
from iridium.version_util import tr
|
||||
|
||||
|
||||
|
||||
@@ -47,10 +47,6 @@ class Config(Serializable):
|
||||
|
||||
# 当前配置:MCDR 数据目录 → config/iridium/iridium.yml
|
||||
CONFIG_FILE_NAME = "iridium.yml"
|
||||
# 历史路径(仅用于迁移)
|
||||
LEGACY_JSON_NAMES = (
|
||||
"iridium.json", # config/iridium/iridium.json
|
||||
)
|
||||
|
||||
|
||||
def build_default_config_text() -> str:
|
||||
@@ -102,8 +98,6 @@ motd_lines:
|
||||
"""
|
||||
|
||||
|
||||
DEFAULT_CONFIG_TEXT = build_default_config_text()
|
||||
|
||||
# 模块级单例;on_load 时原地更新字段,避免各模块持有过期引用
|
||||
config = Config()
|
||||
|
||||
|
||||
@@ -260,7 +260,6 @@ def _extract_item_payload(payload: str, version: Version) -> Optional[str]:
|
||||
def _do_swap(server: PluginServerInterface, src: CommandSource, player: str, version: Version) -> bool:
|
||||
name = sanitize_name(player)
|
||||
head_slot = _head_slot(version)
|
||||
hand_slot = _hand_slot(version, 0)
|
||||
|
||||
# 1.17+: true swap via offhand buffer — no need to rebuild item NBT
|
||||
if is_at_least(version, "1.17"):
|
||||
|
||||
@@ -6,8 +6,6 @@ from iridium.config import config
|
||||
|
||||
# Fallback strings when ServerInterface is unavailable (unit tests / early import)
|
||||
_FALLBACK = {
|
||||
"click_copy": "click to copy data",
|
||||
"click_suggest": "click for data command",
|
||||
"calc_usage": "Usage: !!c <expression>",
|
||||
"share_showing": "is showing",
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user