chore(release): v0.1.6
### Fixed - Global Chat Issue: - Resolved bugs affecting the functionality of the global chat.
This commit is contained in:
parent
dd248095d6
commit
ce52c98668
|
@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## [0.1.6] - 2024-10-21
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Global Chat Issue**:
|
||||
- Resolved bugs affecting the functionality of the global chat.
|
||||
|
||||
## [0.1.5] - 2024-10-21
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -4,6 +4,13 @@
|
|||
|
||||
Формат основан на [Keep a Changelog](https://keepachangelog.com/ru/1.0.0/), и этот проект придерживается [Семантического Версионирования](https://semver.org/lang/ru/).
|
||||
|
||||
## [0.1.6] - 2024-10-21
|
||||
|
||||
### Исправлено
|
||||
|
||||
- **Проблема с глобальным чатом**:
|
||||
- Исправлены ошибки, влияющие на работу глобального чата.
|
||||
|
||||
## [0.1.5] - 2024-10-21
|
||||
|
||||
### Исправлено
|
||||
|
|
|
@ -38,7 +38,7 @@ mod_name=ChatIT
|
|||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||
mod_license=All Rights Reserved
|
||||
# The mod version. See https://semver.org/
|
||||
mod_version=0.1.5-BETA
|
||||
mod_version=0.1.6-BETA
|
||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||
# This should match the base package used for the mod sources.
|
||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
|
|
|
@ -48,24 +48,36 @@ public class ChatEventHandler {
|
|||
MutableComponent adultComponent = createAdultMessage();
|
||||
sender.sendSystemMessage(adultComponent);
|
||||
} else {
|
||||
boolean messageSent = false;
|
||||
boolean localMessageSent = false;
|
||||
for (ServerPlayer receiver : server.getPlayerList().getPlayers()) {
|
||||
PlayerConfigManager.ensurePlayerExists(receiver);
|
||||
|
||||
if (profanityScore > threshold && !PlayerConfigManager.hasAdultContentEnabled(receiver)) {
|
||||
continue;
|
||||
}
|
||||
if (((receiver.getCommandSenderWorld() == sender.getCommandSenderWorld() && receiver.position().distanceTo(sender.position()) <= 50) && (sender != receiver)) || isGlobal) {
|
||||
|
||||
if (isGlobal) {
|
||||
receiver.sendSystemMessage(chatComponent);
|
||||
messageSent = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (receiver.getCommandSenderWorld() != sender.getCommandSenderWorld() ||
|
||||
receiver.position().distanceTo(sender.position()) > 50 ||
|
||||
receiver == sender) {
|
||||
continue;
|
||||
}
|
||||
|
||||
receiver.sendSystemMessage(chatComponent);
|
||||
localMessageSent = true;
|
||||
}
|
||||
if (!messageSent) {
|
||||
MutableComponent errorComponent = createErrorMessage(Config.messageLocal);
|
||||
sender.sendSystemMessage(errorComponent);
|
||||
}
|
||||
else {
|
||||
sender.sendSystemMessage(chatComponent);
|
||||
|
||||
if (!isGlobal) {
|
||||
if (!localMessageSent) {
|
||||
MutableComponent errorComponent = createErrorMessage(Config.messageLocal);
|
||||
sender.sendSystemMessage(errorComponent);
|
||||
} else {
|
||||
sender.sendSystemMessage(chatComponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue