Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] DMCC 2.3.5 Work #260

Merged
merged 9 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ body:
If a version is not listed below, it is not supported by DMCC.
multiple: false
options:
- "1.21.3"
- "1.21.2"
- "1.21.1"
- "1.21"
- "1.20.6"
Expand Down Expand Up @@ -60,6 +62,7 @@ body:
multiple: false
options:
- "Latest Build (GitHub Actions)"
- "2.3.5"
- "2.3.4"
- "2.3.4-compat"
- "2.3.3"
Expand Down
51 changes: 24 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,46 @@
# Changelog 更新日志

## Discord-MC-Chat 2.3.4 for Minecraft 1.19.4+ - 2024/7/11
## Discord-MC-Chat 2.3.5 for Minecraft 1.14.4+ - 2024/10/29

DMCC Discord Server is now public! Join now through: https://discord.gg/kbXkV6k2XU

DMCC will support the [Placeholder API](<https://placeholders.pb4.eu/>) in the next release.
DMCC now supports switching to Brazilian Portuguese. Note that DMCC no longer releases Active and Compat versions separately.

`botPlayingStatus` and `botListeningStatus` have been renamed to `botPlayingActivity` and `botListeningActivity`. Please modify them before restarting the server to avoid losing any existing changes.

In addition, the check for updates feature has been fixed. You will be able to receive update notifications for future new versions when using version 2.3.4.
As this is a minor release, new features that involve modifying the config file will not be released in this version.

DMCC Discord 服务器现已公开!通过以下链接加入:https://discord.gg/kbXkV6k2XU

DMCC 将在下一个版本中支持 [Placeholder API](<https://placeholders.pb4.eu/>)。

`botPlayingStatus` 和 `botListeningStatus` 已被重命名为 `botPlayingActivity` 和 `botListeningActivity`。请在重新启动服务器之前进行修改,以免丢失现有的更改。
DMCC 现在支持切换到巴西葡萄牙语。留意现在 DMCC 不再分开发布 Active 和 Compat 版本。

此外,检查更新的功能已经修复。在使用 2.3.4 版本时,你将能够接收到未来新版本的更新推送
由于这是一个次要版本,涉及到修改配置文件的新功能暂时不会发布

## New Features 新特性

- Add the ability to display server status in the bot's Discord online status (#95)
添加在机器人的 Discord 在线状态中显示服务器状态的功能
- Brazilian Portuguese translation (#243)
巴西葡萄牙语翻译

## Changes 更改
- Supports broadcasting messages sent using the /tellraw @a command (#132 and #250)
支持广播使用 /tellraw @a 命令发送的消息

- Improved detection logic for dynamic-created DMCC Webhooks (#233)
改进 DMCC Webhook 动态创建的检测逻辑
- Restore /say command broadcast feature in versions 1.18.2 and below (#197)
恢复在 1.18.2 及更早版本中广播 /say 命令的功能

- Fix number of players in bot activity does not decrease when player leaves the game (#235)
修复机器人活动状态中的玩家数量在玩家离开游戏时不会减少
- Throws exception when Webhook fails to send (#249)
在 Webhook 发送失败时抛出异常

- Fix DMCC update notifications never being sent (#231, #234 and #239)
修复 DMCC 更新通知从未发送
- Compatible with Minecraft 1.21.2 and 1.21.3 (#258)
兼容 Minecraft 1.21.2 和 1.21.3 版本

- Fix exception when the world/stats folder does not exist (#38)
修复 world/stats 文件夹不存在时报错
## Changes 更改

- No longer delays checking for updates by an hour (#52)
不再延迟一小时开始检查更新
- Changed the way DMCC handles the /say command (#197)
更改 DMCC 处理 /say 命令的方式

- Fix exception when /stats command message exceeds 2000 characters (#212)
修复 /stats 命令消息超过 2000 个字符时报错
- Webhook check only displays an error message when Guild permission is insufficient
Webhook 检查在 Guild 权限不足时仅显示错误消息

- Rename botPlayingStatus and botListeningStatus -> botPlayingActivity and botListeningActivity (#95)
重命名 botPlayingStatusbotListeningStatus -> botPlayingActivity 和 botListeningActivity
- No longer release Active and Compat versions separately
不再分开发布 ActiveCompat 版本

## Removed 移除

Expand All @@ -53,7 +49,8 @@ N/A
## Contributors 贡献者

- @Xujiayao
- @rodrigoaddor

## Detailed Information 详细信息

https://github.com/Xujiayao/Discord-MC-Chat/compare/2.3.3...2.3.4
https://github.com/Xujiayao/Discord-MC-Chat/compare/2.3.4...2.3.5
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ For translation contributions, language files are located in the `/wrapper/src/m
- Broadcast player command execution
- Players who execute commands can also see the commands themselves
- Exclude broadcasts for execution of specific commands
- Support broadcasting messages sent using /tellraw and /say command
- Send all console log messages to Discord
- Discord Commands available
- Use Discord to manage channels that can execute DMCC commands
Expand Down Expand Up @@ -150,6 +151,7 @@ Languages currently available:
| `ko_kr` | 한국어(대한민국) |
| `no_no` | Norsk Bokmål (Norge) |
| `pl_pl` | Polski (Polska) |
| `pt_br` | Português (Brasil) |
| `ru_ru` | Русский (Россия) |
| `zh_cn` | 简体中文(中国大陆) |
| `zh_hk` | 繁體中文(香港特別行政區) |
Expand Down
2 changes: 2 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ DMCC Discord 服务器现已公开!通过以下链接加入:https://discord.
- 可广播玩家指令执行
- 执行指令的玩家也可以看到自己执行的指令
- 可排除执行特定指令的广播
- 支持广播使用 /tellraw 和 /say 命令发送的消息
- 可将所有控制台日志消息发送到 Discord
- 可使用 Discord 命令
- 可使用 Discord 管理可执行 DMCC 命令的频道
Expand Down Expand Up @@ -150,6 +151,7 @@ DMCC Discord 服务器现已公开!通过以下链接加入:https://discord.
| `ko_kr` | 한국어(대한민국) |
| `no_no` | Norsk Bokmål (Norge) |
| `pl_pl` | Polski (Polska) |
| `pt_br` | Português (Brasil) |
| `ru_ru` | Русский (Россия) |
| `zh_cn` | 简体中文(中国大陆) |
| `zh_hk` | 繁體中文(香港特別行政區) |
Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "fabric-loom" version "1.7-SNAPSHOT" apply false
id "fabric-loom" version "1.8-SNAPSHOT" apply false
id "com.replaymod.preprocess" version "88169fcb"
id "com.gradleup.shadow" version "8.3.3" apply false
}
Expand All @@ -17,6 +17,7 @@ preprocess {
def mc1202 = createNode("1.20.2", 1_20_02, "mojang")
def mc1204 = createNode("1.20.4", 1_20_04, "mojang")
def mc1211 = createNode("1.21.1", 1_21_01, "mojang")
def mc1213 = createNode("1.21.3", 1_21_03, "mojang")

mc1152.link(mc1165, file("versions/mapping-1.15.2-1.16.5.txt"))
mc1165.link(mc1171, null)
Expand All @@ -29,6 +30,7 @@ preprocess {
mc1201.link(mc1202, file("versions/mapping-1.20.1-1.20.2.txt"))
mc1202.link(mc1204, null)
mc1204.link(mc1211, null)
mc1211.link(mc1213, file("versions/mapping-1.21.1-1.21.3.txt"))
}

project.afterEvaluate {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ org.gradle.jvmargs=-Xmx8G
org.gradle.parallel=true

# Mod Properties
mod_version=2.3.4
mod_version=2.3.5
maven_group=com.xujiayao.discord_mc_chat
archives_base_name=Discord-MC-Chat

# Wrapper Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.1
loader_version=0.16.4
fabric_version=0.103.0+1.21.1
minecraft_version=1.21.3
loader_version=0.16.7
fabric_version=0.107.0+1.21.3
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def versions = Arrays.asList(
"1.20.1",
"1.20.2",
"1.20.4",
"1.21.1"
"1.21.1",
"1.21.3"
)
for (String version : versions) {
include(":$version")
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/xujiayao/discord_mc_chat/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public static class Generic {
public String consoleLogChannelId = "";
public String updateNotificationChannelId = "";

public String avatarApi = "https://mc-heads.net/avatar/{player_uuid}.png";
public boolean useUuidInsteadOfName = true;

public String avatarApi = "https://mc-heads.net/avatar/%player%.png";

public boolean broadcastPlayerCommandExecution = true;
public boolean broadcastSlashCommandExecution = true;
Expand Down Expand Up @@ -64,7 +66,7 @@ public static class Generic {

public boolean shutdownImmediately = false;

public List<String> excludedCommands = List.of("\\/msg ([^@].*)", "\\/tell ([^@].*)", "\\/tellraw ([^@].*)", "\\/w ([^@].*)", "\\/teammsg (.*)", "\\/tm (.*)");
public List<String> excludedCommands = List.of("/msg", "/tell", "/tellraw", "/w");

public List<String> adminsIds = new ArrayList<>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public static void init() {
if (CONFIG.generic.announceAdvancements
&& isDone
&& display.shouldAnnounceChat()
&& player.level().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {
&& player.serverLevel().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {
String message = "null";

switch (display.getType()) {
Expand Down
4 changes: 2 additions & 2 deletions update/version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "2.3.4",
"changelog": "<https://github.com/Xujiayao/Discord-MC-Chat/releases/tag/2.3.4>\n\n> DMCC Discord Server is now public! Join now through: https://discord.gg/kbXkV6k2XU\n> \n> DMCC will support the [Placeholder API](<https://placeholders.pb4.eu/>) in the next release.\n> \n> `botPlayingStatus` and `botListeningStatus` have been renamed to `botPlayingActivity` and `botListeningActivity`. Please modify them before restarting the server to avoid losing any existing changes.\n> \n> In addition, the check for updates feature has been fixed. You will be able to receive update notifications for future new versions when using version 2.3.4."
"version": "2.3.5",
"changelog": "<https://github.com/Xujiayao/Discord-MC-Chat/releases/tag/2.3.5>\n\n> DMCC Discord Server is now public! Join now through: https://discord.gg/kbXkV6k2XU\n> \n> DMCC now supports switching to Brazilian Portuguese. Note that DMCC no longer releases Active and Compat versions separately.\n> \n> As this is a minor release, new features that involve modifying the config file will not be released in this version."
}
31 changes: 13 additions & 18 deletions update/versions.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
{
"versions": [
{
"version": "2.3.4",
"changelog": "<https://github.com/Xujiayao/Discord-MC-Chat/releases/tag/2.3.4>\n\n> DMCC Discord Server is now public! Join now through: https://discord.gg/kbXkV6k2XU\n> \n> DMCC will support the [Placeholder API](<https://placeholders.pb4.eu/>) in the next release.\n> \n> `botPlayingStatus` and `botListeningStatus` have been renamed to `botPlayingActivity` and `botListeningActivity`. Please modify them before restarting the server to avoid losing any existing changes.\n> \n> In addition, the check for updates feature has been fixed. You will be able to receive update notifications for future new versions when using version 2.3.4.",
"minecraft_dependency": [
"~1.19.4",
"1.20",
"1.20.1",
"1.20.2",
"1.20.3",
"1.20.4",
"~1.20.5",
"~1.21"
]
},
{
"notes": "To be removed",
"version": "2.3.4-compat",
"changelog": "<https://github.com/Xujiayao/Discord-MC-Chat/releases/tag/2.3.4-compat>\n\n> DMCC Discord Server is now public! Join now through: https://discord.gg/kbXkV6k2XU\n> \n> DMCC will support the [Placeholder API](<https://placeholders.pb4.eu/>) in the next release.\n> \n> `botPlayingStatus` and `botListeningStatus` have been renamed to `botPlayingActivity` and `botListeningActivity`. Please modify them before restarting the server to avoid losing any existing changes.\n> \n> In addition, the check for updates feature has been fixed. You will be able to receive update notifications for future new versions when using version 2.3.4.",
"version": "2.3.5",
"changelog": "<https://github.com/Xujiayao/Discord-MC-Chat/releases/tag/2.3.5>\n\n> DMCC Discord Server is now public! Join now through: https://discord.gg/kbXkV6k2XU\n> \n> DMCC now supports switching to Brazilian Portuguese. Note that DMCC no longer releases Active and Compat versions separately.\n> \n> As this is a minor release, new features that involve modifying the config file will not be released in this version.",
"minecraft_dependency": [
"~1.14.4",
"~1.15.2",
Expand All @@ -27,7 +12,17 @@
"1.19",
"1.19.1",
"1.19.2",
"1.19.3"
"1.19.3",
"~1.19.4",
"1.20",
"1.20.1",
"1.20.2",
"1.20.3",
"1.20.4",
"~1.20.5",
"1.21",
"1.21.1",
"~1.21.2"
]
}
]
Expand Down
4 changes: 2 additions & 2 deletions versions/1.21.1/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
minecraft_version=1.21.1

# Fabric Mod Metadata
minecraft_dependency=~1.20.5,~1.21
minecraft_dependency=~1.20.5,1.21,1.21.1

# Dependencies
fabric_version=0.103.0+1.21.1
fabric_version=0.107.0+1.21.1
9 changes: 9 additions & 0 deletions versions/1.21.3/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.3

# Fabric Mod Metadata
minecraft_dependency=~1.21.2

# Dependencies
fabric_version=0.107.0+1.21.3
2 changes: 1 addition & 1 deletion versions/mainProject
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.21.1
1.21.3
1 change: 1 addition & 0 deletions versions/mapping-1.21.1-1.21.3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
net.minecraft.server.level.ServerPlayer level() serverLevel()