feat: log command operations to server console (26.9.4)
This commit is contained in:
1 parent
b464b5ba5e
commit
080b1054b7
7 files changed
+12
-2
No files matched your search
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
本文件记录 Iridium 的重要变更。
|
本文件记录 Iridium 的重要变更。
|
||||||
|
|
||||||
|
## [26.9.4] - 2026-09-13
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- 操作日志:`!!share` / `!!hat` / `!!head` / `!!c` 成功时写入 MCDR 控制台(`[Iridium] ...`)
|
||||||
|
|
||||||
## [26.9.3] - 2026-09-13
|
## [26.9.3] - 2026-09-13
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ MCDReforged 插件:物品展示 / 戴头 / 获取头颅 / 游戏内计算器 /
|
|||||||
|
|
||||||
| | |
|
| | |
|
||||||
|---|---|
|
|---|---|
|
||||||
| 版本 | **26.9.3** |
|
| 版本 | **26.9.4** |
|
||||||
| 作者 | 云镜之端/SKYMirror |
|
| 作者 | 云镜之端/SKYMirror |
|
||||||
| 许可 | 保留所有权益(All Rights Reserved) |
|
| 许可 | 保留所有权益(All Rights Reserved) |
|
||||||
| 前置 | MCDReforged `>= 2.6.0` |
|
| 前置 | MCDReforged `>= 2.6.0` |
|
||||||
|
|||||||
@@ -92,6 +92,8 @@ def do_calc(server: PluginServerInterface, src: CommandSource, context: dict) ->
|
|||||||
return
|
return
|
||||||
|
|
||||||
out = _format_result(result)
|
out = _format_result(result)
|
||||||
|
who = src.get_info().player if src.is_player else "console"
|
||||||
|
server.logger.info(f"[Iridium] !!c: {who} {expression} = {out}")
|
||||||
# Private reply to avoid flooding public chat
|
# Private reply to avoid flooding public chat
|
||||||
src.reply(
|
src.reply(
|
||||||
RTextList(
|
RTextList(
|
||||||
|
|||||||
@@ -329,6 +329,7 @@ def do_hat(server: PluginServerInterface, src: CommandSource) -> None:
|
|||||||
|
|
||||||
if _do_swap(server, src, player, version):
|
if _do_swap(server, src, player, version):
|
||||||
mark_cooldown(player, "hat")
|
mark_cooldown(player, "hat")
|
||||||
|
server.logger.info(f"[Iridium] !!hat: {player} swapped hand/head gear")
|
||||||
|
|
||||||
|
|
||||||
def register(server: PluginServerInterface) -> None:
|
def register(server: PluginServerInterface) -> None:
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ def do_head(server: PluginServerInterface, src: CommandSource, context: dict) ->
|
|||||||
|
|
||||||
safe_execute(server, _give_head_command(player, safe_target, version))
|
safe_execute(server, _give_head_command(player, safe_target, version))
|
||||||
mark_cooldown(player, "head")
|
mark_cooldown(player, "head")
|
||||||
|
server.logger.info(f"[Iridium] !!head: {player} -> head of {safe_target}")
|
||||||
src.reply(RText(tr("head_success", safe_target), RColor.green))
|
src.reply(RText(tr("head_success", safe_target), RColor.green))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ def _send_share(
|
|||||||
safe_execute(server, _build_tellraw(player, item_snbt, version))
|
safe_execute(server, _build_tellraw(player, item_snbt, version))
|
||||||
if config.share_sound:
|
if config.share_sound:
|
||||||
safe_execute(server, _sound_command(version))
|
safe_execute(server, _sound_command(version))
|
||||||
|
server.logger.info(f"[Iridium] !!share: {player} shared an item ({len(item_snbt)} chars)")
|
||||||
src.reply(RText(tr("share_done"), RColor.green))
|
src.reply(RText(tr("share_done"), RColor.green))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"id": "iridium",
|
"id": "iridium",
|
||||||
"version": "26.9.3",
|
"version": "26.9.4",
|
||||||
"name": "Iridium",
|
"name": "Iridium",
|
||||||
"description": {
|
"description": {
|
||||||
"zh_cn": "物品展示 / 戴头 / 获取头颅 / 游戏内计算器 / 进服 MOTD",
|
"zh_cn": "物品展示 / 戴头 / 获取头颅 / 游戏内计算器 / 进服 MOTD",
|
||||||
|
|||||||
Reference in new issue
Block a user