清理:移除未使用代码与翻译键,更新文档版本 (26.9.17)
This commit is contained in:
1 parent
3461f996dc
commit
5eeab209f5
11 files changed
+13
-18
No files matched your search
@@ -5,6 +5,14 @@ This file records notable changes to Iridium.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## [26.9.17] - 2026-09-14
|
||||||
|
|
||||||
|
### 清理 / Cleanup
|
||||||
|
- 移除未使用的常量、翻译键与导入
|
||||||
|
- Removed unused constants, translation keys, and imports
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## [26.9.16] - 2026-09-14
|
## [26.9.16] - 2026-09-14
|
||||||
|
|
||||||
### 变更 / Changed
|
### 变更 / Changed
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ MCDReforged 插件:物品展示 / 戴头 / 获取头颅 / 游戏内计算器 /
|
|||||||
|
|
||||||
| | |
|
| | |
|
||||||
|---|---|
|
|---|---|
|
||||||
| 版本 | **26.9.16** |
|
| 版本 | **26.9.17** |
|
||||||
| 作者 | 云镜之端/SKYMirror |
|
| 作者 | 云镜之端/SKYMirror |
|
||||||
| 许可 | 保留所有权益(All Rights Reserved) |
|
| 许可 | 保留所有权益(All Rights Reserved) |
|
||||||
| 前置 | MCDReforged `>= 2.6.0` |
|
| 前置 | MCDReforged `>= 2.6.0` |
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ MCDReforged plugin: item share / wear on head / player head / calculator / join
|
|||||||
|
|
||||||
| | |
|
| | |
|
||||||
|---|---|
|
|---|---|
|
||||||
| Version | **26.9.16** |
|
| Version | **26.9.17** |
|
||||||
| Author | 云镜之端/SKYMirror |
|
| Author | 云镜之端/SKYMirror |
|
||||||
| License | All Rights Reserved |
|
| License | All Rights Reserved |
|
||||||
| Requires | MCDReforged `>= 2.6.0` |
|
| Requires | MCDReforged `>= 2.6.0` |
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
- ID: `iridium`
|
- ID: `iridium`
|
||||||
- Name: Iridium
|
- Name: Iridium
|
||||||
- Repository: https://github.com/HzSKYMirror/Iridium
|
- Repository: https://github.com/HzSKYMirror/Iridium
|
||||||
- Release: https://github.com/HzSKYMirror/Iridium/releases/tag/v26.9.13
|
- Release: https://github.com/HzSKYMirror/Iridium/releases/tag/v26.9.17
|
||||||
- Labels: `tool`
|
- Labels: `tool`
|
||||||
|
|
||||||
## Summary
|
## Summary
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ import iridium.hat as hat
|
|||||||
import iridium.head as head
|
import iridium.head as head
|
||||||
import iridium.join_tip as join_tip
|
import iridium.join_tip as join_tip
|
||||||
import iridium.share as share
|
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
|
from iridium.version_util import tr
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -47,10 +47,6 @@ class Config(Serializable):
|
|||||||
|
|
||||||
# 当前配置:MCDR 数据目录 → config/iridium/iridium.yml
|
# 当前配置:MCDR 数据目录 → config/iridium/iridium.yml
|
||||||
CONFIG_FILE_NAME = "iridium.yml"
|
CONFIG_FILE_NAME = "iridium.yml"
|
||||||
# 历史路径(仅用于迁移)
|
|
||||||
LEGACY_JSON_NAMES = (
|
|
||||||
"iridium.json", # config/iridium/iridium.json
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def build_default_config_text() -> str:
|
def build_default_config_text() -> str:
|
||||||
@@ -102,8 +98,6 @@ motd_lines:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_CONFIG_TEXT = build_default_config_text()
|
|
||||||
|
|
||||||
# 模块级单例;on_load 时原地更新字段,避免各模块持有过期引用
|
# 模块级单例;on_load 时原地更新字段,避免各模块持有过期引用
|
||||||
config = Config()
|
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:
|
def _do_swap(server: PluginServerInterface, src: CommandSource, player: str, version: Version) -> bool:
|
||||||
name = sanitize_name(player)
|
name = sanitize_name(player)
|
||||||
head_slot = _head_slot(version)
|
head_slot = _head_slot(version)
|
||||||
hand_slot = _hand_slot(version, 0)
|
|
||||||
|
|
||||||
# 1.17+: true swap via offhand buffer — no need to rebuild item NBT
|
# 1.17+: true swap via offhand buffer — no need to rebuild item NBT
|
||||||
if is_at_least(version, "1.17"):
|
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 strings when ServerInterface is unavailable (unit tests / early import)
|
||||||
_FALLBACK = {
|
_FALLBACK = {
|
||||||
"click_copy": "click to copy data",
|
|
||||||
"click_suggest": "click for data command",
|
|
||||||
"calc_usage": "Usage: !!c <expression>",
|
"calc_usage": "Usage: !!c <expression>",
|
||||||
"share_showing": "is showing",
|
"share_showing": "is showing",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ iridium.share_help: 'Show the item in your main hand (hover to view)'
|
|||||||
iridium.share_done: 'Item shared to chat'
|
iridium.share_done: 'Item shared to chat'
|
||||||
iridium.share_unsupported_version: 'Version {0} cannot read held item (needs Minecraft 1.8+)'
|
iridium.share_unsupported_version: 'Version {0} cannot read held item (needs Minecraft 1.8+)'
|
||||||
iridium.share_timeout: 'Timed out reading held item, try again later'
|
iridium.share_timeout: 'Timed out reading held item, try again later'
|
||||||
iridium.click_copy: 'click to copy data'
|
|
||||||
iridium.click_suggest: 'click for data command'
|
|
||||||
iridium.share_showing: 'is showing'
|
iridium.share_showing: 'is showing'
|
||||||
iridium.hat_help: 'Swap the item in your hand with your head slot'
|
iridium.hat_help: 'Swap the item in your hand with your head slot'
|
||||||
iridium.hat_success: 'Swapped hand item with head equipment'
|
iridium.hat_success: 'Swapped hand item with head equipment'
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ iridium.share_help: '展示手上物品的完整信息(悬停查看)'
|
|||||||
iridium.share_done: '已在聊天栏展示物品'
|
iridium.share_done: '已在聊天栏展示物品'
|
||||||
iridium.share_unsupported_version: '当前版本 {0} 无法读取手持物品(需要 Minecraft 1.8+)'
|
iridium.share_unsupported_version: '当前版本 {0} 无法读取手持物品(需要 Minecraft 1.8+)'
|
||||||
iridium.share_timeout: '读取手持物品超时,请稍后再试'
|
iridium.share_timeout: '读取手持物品超时,请稍后再试'
|
||||||
iridium.click_copy: '点击复制完整数据'
|
|
||||||
iridium.click_suggest: '点击获取完整数据命令'
|
|
||||||
iridium.share_showing: '正在展示'
|
iridium.share_showing: '正在展示'
|
||||||
iridium.hat_help: '将手上物品与头部装备互换'
|
iridium.hat_help: '将手上物品与头部装备互换'
|
||||||
iridium.hat_success: '已交换手上物品与头部装备'
|
iridium.hat_success: '已交换手上物品与头部装备'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"id": "iridium",
|
"id": "iridium",
|
||||||
"version": "26.9.16",
|
"version": "26.9.17",
|
||||||
"name": "Iridium",
|
"name": "Iridium",
|
||||||
"description": {
|
"description": {
|
||||||
"zh_cn": "物品展示 / 戴头 / 获取头颅 / 游戏内计算器 / 进服 MOTD",
|
"zh_cn": "物品展示 / 戴头 / 获取头颅 / 游戏内计算器 / 进服 MOTD",
|
||||||
|
|||||||
Reference in new issue
Block a user