Fix tick timeout
This commit is contained in:
parent
c5feae6512
commit
dbdd6c9ac4
|
@ -49,14 +49,9 @@ public class ChatEventHandler {
|
||||||
if (profanityScore > threshold && !PlayerConfigManager.hasAdultContentEnabled(receiver)) {
|
if (profanityScore > threshold && !PlayerConfigManager.hasAdultContentEnabled(receiver)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (isGlobal || (receiver.getCommandSenderWorld() == sender.getCommandSenderWorld() && receiver.position().distanceTo(sender.position()) <= 50)) {
|
||||||
try (var senderLevel = sender.level(); var receiverLevel = receiver.level()) {
|
|
||||||
if (isGlobal || (receiverLevel == senderLevel && receiver.position().distanceTo(sender.position()) <= 50)) {
|
|
||||||
receiver.sendSystemMessage(chatComponent);
|
receiver.sendSystemMessage(chatComponent);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue