Closed Ricozaur closed 2 weeks ago
what is the /e command doing?
It works, but when you type an emoji, the message won't be sent and an error is shown in the console.
I've asked what the command does...
It pastes a custom itemsadder IMG in chat using symbols /e = /emoji
Would it be possible for you to get the developer of ItemsAdder here to explain what exactly the /e command does? It seems to be running async even synchronously
@LoneDev6
We could also just cancel the event if it's not async and should be. Not sure how to approach this or what even causes this honestly
Contact the author of AdvancedChat and ask them to trigger their AsyncPlayerChatEvent event synchronously, it's not something caused by my plugin directly.
at net.advancedplugins.chat.listeners.ChatListener.onChat(ChatListener.java:101) ~[AdvancedChat-1.2.0.jar:?]
at net.advancedplugins.chat.Core.lambda$registerChatListener$2(Core.java:431) ~[AdvancedChat-1.2.0.jar:?]
package dev.lone.itemsadder.commands;
import dev.lone.itemsadder.Core.Core;
import dev.lone.itemsadder.Main;
import dev.lone.itemsadder.Permissions;
import org.jetbrains.annotations.NotNull;
import dev.lone.itemsadder.utils.Msg;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class IAImage extends ItemsAdderCommand
{
public IAImage()
{
Main.getCmd("iaimage").setExecutor(this);
}
@Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String[] args)
{
if (!checkIfCoreIsLoaded(commandSender, command))
return true;
if (!(commandSender instanceof Player))
{
Msg.warn(Main.lang.getLocalized("command-ingame-only"));
return true;
}
Player player = (Player) commandSender;
if (!Permissions.checkPermission(player, Permissions.IMAGE_GUI))
return true;
if (args.length == 0)
Core.inst().fontImagesBookGui.showBookGui(player);
else
{
// Fix for kick "Illegal characters in chat" https://github.com/PluginBugs/Issues-ItemsAdder/issues/1975
// player.chat() function can't be used to send colored messages, only pure characters.
String msg =
ChatColor.stripColor(
String.join(" ", args)
);
//WARNING! player.chat() doesn't trigger the packet listener because it's called by the server itself
// to simulate player messages. It triggers AsyncPlayerChatEvent although.
player.chat(msg);
}
return true;
}
}
Honestly I am surprised about Async event being sync, but sure. Just confused me for a bit. Thank you for the explanation @LoneDev6 . Will be fixed next update
Describe the bug
Cannot type emoji's in chat, for example items adder ranks. "/iaemoji :amythyst_icon:"
results in:
https://mclo.gs/GtGqWL3
How to reproduce
Try such emoji's in chat
Screenshots / Videos
https://mclo.gs/GtGqWL3
Server Log
No response