Style fixes

This commit is contained in:
Hernán Indíbil de la Cruz Calvo 2024-09-01 22:29:31 +02:00
parent 2292da79df
commit 900c0173f1
3 changed files with 8 additions and 5 deletions

View File

@ -38,7 +38,12 @@ import net.essentialsx.discord.interactions.InteractionRoleImpl;
import net.essentialsx.discord.interactions.commands.ExecuteCommand;
import net.essentialsx.discord.interactions.commands.ListCommand;
import net.essentialsx.discord.interactions.commands.MessageCommand;
import net.essentialsx.discord.listeners.*;
import net.essentialsx.discord.listeners.BukkitChatListener;
import net.essentialsx.discord.listeners.BukkitListener;
import net.essentialsx.discord.listeners.DiscordCommandDispatcher;
import net.essentialsx.discord.listeners.DiscordListener;
import net.essentialsx.discord.listeners.EssentialsChatListener;
import net.essentialsx.discord.listeners.PaperChatListener;
import net.essentialsx.discord.util.ConsoleInjector;
import net.essentialsx.discord.util.DiscordUtil;
import net.essentialsx.discord.util.MessageUtil;
@ -354,8 +359,7 @@ public class JDADiscordService implements DiscordService, IEssentialsModule {
if (getSettings().isUseEssentialsEvents() && plugin.isEssentialsChat()) {
chatListener = new EssentialsChatListener(this);
}
else {
} else {
try {
Class.forName("io.papermc.paper.event.player.AsyncChatEvent");
chatListener = new PaperChatListener(this);

View File

@ -25,7 +25,7 @@ public class AbstractAsyncChatEvent extends PlayerEvent {
public Set<Player> getRecipients() {
return playerRecipients;
};
}
@Override
public @NotNull HandlerList getHandlers() {

View File

@ -32,7 +32,6 @@ public class PaperAsyncChatListenerProvider implements Listener {
this.serializer = yeOldSerializer;
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onAsyncChatEvent(final AsyncChatEvent event) {
Bukkit.getPluginManager().callEvent(