This commit is contained in:
Chayapak 2023-09-22 21:25:50 +07:00
parent 94cac6b998
commit c4ea445a95
2 changed files with 5 additions and 2 deletions

View file

@ -86,7 +86,7 @@ public class AuthPlugin extends PlayersPlugin.Listener {
private void systemMessageReceived (Component component, boolean isCommandSuggestions, boolean isAuth, boolean isImposterFormat) {
try {
if (isCommandSuggestions || !isAuth || !isImposterFormat) return;
if (isCommandSuggestions || !isAuth || isImposterFormat) return;
final List<Component> children = component.children();

View file

@ -5,6 +5,9 @@ import land.chipmunk.chayapak.chomens_bot.Bot;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.TranslatableComponent;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.format.Style;
import net.kyori.adventure.text.format.TextDecoration;
import java.nio.charset.StandardCharsets;
import java.util.List;
@ -22,7 +25,7 @@ public class FormatCheckerPlugin extends ChatPlugin.Listener {
public void systemMessageReceived(Component component, boolean isCommandSuggestions, boolean isAuth, boolean isImposterFormat, String string, String ansi) {
if (!isImposterFormat) return;
bot.chat.tellraw(Component.text("fake chomens custom chat .,.,.,.,"));
bot.chat.tellraw(Component.text("Possible fake ChomeNS custom chat (this can be false-positive)").color(NamedTextColor.GRAY).style(Style.style(TextDecoration.ITALIC)));
}
public boolean isImposterFormat (Component component) {