|
|
|
@@ -1,14 +1,26 @@
|
|
|
|
|
package me.asmin.discordbridge;
|
|
|
|
|
|
|
|
|
|
import io.papermc.paper.event.player.AsyncChatEvent;
|
|
|
|
|
import net.dv8tion.jda.api.EmbedBuilder;
|
|
|
|
|
import net.dv8tion.jda.api.JDA;
|
|
|
|
|
import net.dv8tion.jda.api.JDABuilder;
|
|
|
|
|
import net.dv8tion.jda.api.Permission;
|
|
|
|
|
import net.dv8tion.jda.api.entities.Guild;
|
|
|
|
|
import net.dv8tion.jda.api.entities.Member;
|
|
|
|
|
import net.dv8tion.jda.api.entities.MessageEmbed;
|
|
|
|
|
import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;
|
|
|
|
|
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
|
|
|
|
|
import net.dv8tion.jda.api.events.interaction.ModalInteractionEvent;
|
|
|
|
|
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
|
|
|
|
import net.dv8tion.jda.api.events.interaction.component.StringSelectInteractionEvent;
|
|
|
|
|
import net.dv8tion.jda.api.events.session.ReadyEvent;
|
|
|
|
|
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
|
|
|
|
import net.dv8tion.jda.api.interactions.commands.DefaultMemberPermissions;
|
|
|
|
|
import net.dv8tion.jda.api.interactions.commands.OptionMapping;
|
|
|
|
|
import net.dv8tion.jda.api.interactions.commands.OptionType;
|
|
|
|
|
import net.dv8tion.jda.api.interactions.commands.build.Commands;
|
|
|
|
|
import net.dv8tion.jda.api.interactions.commands.build.OptionData;
|
|
|
|
|
import net.dv8tion.jda.api.interactions.commands.build.SlashCommandData;
|
|
|
|
|
import net.dv8tion.jda.api.interactions.components.ActionRow;
|
|
|
|
|
import net.dv8tion.jda.api.interactions.components.selections.SelectOption;
|
|
|
|
|
import net.dv8tion.jda.api.interactions.components.selections.StringSelectMenu;
|
|
|
|
@@ -19,6 +31,7 @@ import net.dv8tion.jda.api.interactions.modals.ModalMapping;
|
|
|
|
|
import net.dv8tion.jda.api.requests.GatewayIntent;
|
|
|
|
|
import net.kyori.adventure.text.Component;
|
|
|
|
|
import net.kyori.adventure.text.event.ClickEvent;
|
|
|
|
|
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
|
|
|
|
import net.luckperms.api.LuckPerms;
|
|
|
|
|
import net.luckperms.api.LuckPermsProvider;
|
|
|
|
|
import net.luckperms.api.model.user.User;
|
|
|
|
@@ -34,6 +47,12 @@ import org.bukkit.Bukkit;
|
|
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
|
import org.bukkit.configuration.file.YamlConfiguration;
|
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
import org.bukkit.event.EventHandler;
|
|
|
|
|
import org.bukkit.event.EventPriority;
|
|
|
|
|
import org.bukkit.event.Listener;
|
|
|
|
|
import org.bukkit.event.entity.PlayerDeathEvent;
|
|
|
|
|
import org.bukkit.event.player.PlayerJoinEvent;
|
|
|
|
|
import org.bukkit.event.player.PlayerQuitEvent;
|
|
|
|
|
import org.bukkit.plugin.java.JavaPlugin;
|
|
|
|
|
import org.bukkit.scheduler.BukkitTask;
|
|
|
|
|
|
|
|
|
@@ -50,26 +69,35 @@ import java.util.Collections;
|
|
|
|
|
import java.util.Comparator;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Locale;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.concurrent.ArrayBlockingQueue;
|
|
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
import java.util.concurrent.ThreadPoolExecutor;
|
|
|
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
|
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
import com.sun.net.httpserver.HttpExchange;
|
|
|
|
|
import com.sun.net.httpserver.HttpServer;
|
|
|
|
|
|
|
|
|
|
public final class AsminDiscordBridge extends JavaPlugin {
|
|
|
|
|
public final class AsminDiscordBridge extends JavaPlugin implements Listener {
|
|
|
|
|
private static final Pattern LEGACY_COLOR = Pattern.compile("(?i)§[0-9A-FK-OR]");
|
|
|
|
|
private static final Pattern HEX_COLOR = Pattern.compile("(?i)&#[0-9A-F]{6}");
|
|
|
|
|
private static final Pattern ANSI_COLOR = Pattern.compile("(?:\\u001B\\[|\\[)[0-9;]*m");
|
|
|
|
|
private static final long RELAY_FLUSH_TICKS = 40L;
|
|
|
|
|
private static final int RELAY_MAX_LENGTH = 1900;
|
|
|
|
|
|
|
|
|
|
private JDA jda;
|
|
|
|
|
private LuckPerms luckPerms;
|
|
|
|
|
private File memoryFile;
|
|
|
|
|
private YamlConfiguration memory;
|
|
|
|
|
private BukkitTask refreshTask;
|
|
|
|
|
private BukkitTask relayTask;
|
|
|
|
|
private long channelId;
|
|
|
|
|
private long adminChannelId = -1L;
|
|
|
|
|
private int embedColor;
|
|
|
|
|
private volatile boolean shuttingDown;
|
|
|
|
|
private final Map<Long, RelayState> relays = new ConcurrentHashMap<>();
|
|
|
|
|
private HttpServer webServer;
|
|
|
|
|
private ThreadPoolExecutor webExecutor;
|
|
|
|
|
private final AtomicReference<String> webStatusJson = new AtomicReference<>("{\"server-online\":false,\"online-players\":0,\"online-players-nicks\":{}}\n");
|
|
|
|
@@ -93,6 +121,7 @@ public final class AsminDiscordBridge extends JavaPlugin {
|
|
|
|
|
return true;
|
|
|
|
|
});
|
|
|
|
|
getCommand("discord").setTabCompleter((sender, command, alias, args) -> Collections.emptyList());
|
|
|
|
|
getServer().getPluginManager().registerEvents(this, this);
|
|
|
|
|
|
|
|
|
|
String token = getConfig().getString("discord.token", "").trim();
|
|
|
|
|
String configuredChannel = getConfig().getString("discord.channel-id", "").trim();
|
|
|
|
@@ -133,7 +162,9 @@ public final class AsminDiscordBridge extends JavaPlugin {
|
|
|
|
|
getServer().getScheduler().runTask(AsminDiscordBridge.this, () -> {
|
|
|
|
|
publish(true);
|
|
|
|
|
startRefreshTask();
|
|
|
|
|
startRelayTask();
|
|
|
|
|
publishAdminPanel();
|
|
|
|
|
registerSlashCommands();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@@ -150,6 +181,9 @@ public final class AsminDiscordBridge extends JavaPlugin {
|
|
|
|
|
if (refreshTask != null) {
|
|
|
|
|
refreshTask.cancel();
|
|
|
|
|
}
|
|
|
|
|
if (relayTask != null) {
|
|
|
|
|
relayTask.cancel();
|
|
|
|
|
}
|
|
|
|
|
updateWebStatus(false);
|
|
|
|
|
if (webServer != null) webServer.stop(0);
|
|
|
|
|
if (webExecutor != null) webExecutor.shutdownNow();
|
|
|
|
@@ -182,6 +216,138 @@ public final class AsminDiscordBridge extends JavaPlugin {
|
|
|
|
|
refreshTask = getServer().getScheduler().runTaskTimer(this, () -> publish(true), seconds * 20L, seconds * 20L);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void startRelayTask() {
|
|
|
|
|
if (shuttingDown || relayTask != null) return;
|
|
|
|
|
relayTask = getServer().getScheduler().runTaskTimer(this, this::flushRelays,
|
|
|
|
|
RELAY_FLUSH_TICKS, RELAY_FLUSH_TICKS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void registerSlashCommands() {
|
|
|
|
|
if (jda == null) return;
|
|
|
|
|
SlashCommandData command = Commands.slash("czytaj-chat",
|
|
|
|
|
"Włącza lub wyłącza przekazywanie czatu Minecraft na ten kanał")
|
|
|
|
|
.addOptions(new OptionData(OptionType.STRING, "tryb", "on / off / pause", true)
|
|
|
|
|
.addChoice("on", "on")
|
|
|
|
|
.addChoice("off", "off")
|
|
|
|
|
.addChoice("pause", "pause"))
|
|
|
|
|
.setDefaultPermissions(DefaultMemberPermissions.enabledFor(Permission.ADMINISTRATOR));
|
|
|
|
|
for (Guild guild : jda.getGuilds()) {
|
|
|
|
|
guild.updateCommands().addCommands(command).queue(
|
|
|
|
|
ignored -> { },
|
|
|
|
|
error -> getLogger().warning("Nie udało się zarejestrować komendy /czytaj-chat na "
|
|
|
|
|
+ guild.getName() + ": " + error.getMessage()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
|
|
|
|
public void onPlayerChat(AsyncChatEvent event) {
|
|
|
|
|
if (relays.isEmpty()) return;
|
|
|
|
|
String message = PlainTextComponentSerializer.plainText().serialize(event.message()).trim();
|
|
|
|
|
if (message.isEmpty()) return;
|
|
|
|
|
Player player = event.getPlayer();
|
|
|
|
|
relayMessage(formatPrefix(getPlayerPrefix(player)) + player.getName() + ": " + message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
|
|
|
|
public void onPlayerJoin(PlayerJoinEvent event) {
|
|
|
|
|
relayComponent(event.joinMessage(), event.getPlayer().getName() + " dołączył do gry");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
|
|
|
|
public void onPlayerQuit(PlayerQuitEvent event) {
|
|
|
|
|
relayComponent(event.quitMessage(), event.getPlayer().getName() + " opuścił grę");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@EventHandler(priority = EventPriority.MONITOR)
|
|
|
|
|
public void onPlayerDeath(PlayerDeathEvent event) {
|
|
|
|
|
relayComponent(event.deathMessage(), event.getEntity().getName() + " zginął");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void relayComponent(Component component, String fallback) {
|
|
|
|
|
if (relays.isEmpty()) return;
|
|
|
|
|
String text = component == null ? fallback : PlainTextComponentSerializer.plainText().serialize(component);
|
|
|
|
|
relayMessage(text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void relayMessage(String line) {
|
|
|
|
|
if (relays.isEmpty() || line == null) return;
|
|
|
|
|
String clean = ANSI_COLOR.matcher(ChatColor.stripColor(line))
|
|
|
|
|
.replaceAll("").replace('\r', ' ').replace('\n', ' ').trim();
|
|
|
|
|
if (clean.isEmpty()) return;
|
|
|
|
|
for (RelayState state : relays.values()) {
|
|
|
|
|
if (state.paused) continue;
|
|
|
|
|
synchronized (state.pending) {
|
|
|
|
|
if (state.pending.size() < 200) state.pending.add(clean);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void flushRelays() {
|
|
|
|
|
if (jda == null || relays.isEmpty()) return;
|
|
|
|
|
for (RelayState state : new ArrayList<>(relays.values())) {
|
|
|
|
|
if (state.paused) continue;
|
|
|
|
|
List<String> lines = new ArrayList<>();
|
|
|
|
|
synchronized (state.pending) {
|
|
|
|
|
if (state.pending.isEmpty()) continue;
|
|
|
|
|
lines.addAll(state.pending);
|
|
|
|
|
state.pending.clear();
|
|
|
|
|
}
|
|
|
|
|
if (relays.get(state.channelId) != state) continue;
|
|
|
|
|
MessageChannel channel = jda.getChannelById(MessageChannel.class, state.channelId);
|
|
|
|
|
if (channel == null) {
|
|
|
|
|
relays.remove(state.channelId, state);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
for (String chunk : splitMessage(String.join("\n", lines), RELAY_MAX_LENGTH)) {
|
|
|
|
|
channel.sendMessage(chunk).setAllowedMentions(Collections.emptyList()).queue(
|
|
|
|
|
message -> {
|
|
|
|
|
if (relays.get(state.channelId) == state) {
|
|
|
|
|
state.messageIds.add(message.getId());
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error -> getLogger().warning("Nie udało się wysłać czatu na Discord: " + error.getMessage()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<String> splitMessage(String text, int max) {
|
|
|
|
|
List<String> parts = new ArrayList<>();
|
|
|
|
|
while (text.length() > max) {
|
|
|
|
|
int cut = text.lastIndexOf('\n', max);
|
|
|
|
|
if (cut <= 0) cut = max;
|
|
|
|
|
parts.add(text.substring(0, cut));
|
|
|
|
|
text = text.substring(cut);
|
|
|
|
|
if (text.startsWith("\n")) text = text.substring(1);
|
|
|
|
|
}
|
|
|
|
|
if (!text.isEmpty()) parts.add(text);
|
|
|
|
|
return parts;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void deleteRelayMessages(MessageChannel channel, RelayState state) {
|
|
|
|
|
synchronized (state.pending) {
|
|
|
|
|
state.pending.clear();
|
|
|
|
|
}
|
|
|
|
|
List<String> ids;
|
|
|
|
|
synchronized (state.messageIds) {
|
|
|
|
|
ids = new ArrayList<>(state.messageIds);
|
|
|
|
|
state.messageIds.clear();
|
|
|
|
|
}
|
|
|
|
|
if (ids.isEmpty()) return;
|
|
|
|
|
AtomicBoolean fallback = new AtomicBoolean();
|
|
|
|
|
try {
|
|
|
|
|
channel.purgeMessagesById(ids).forEach(future -> future.exceptionally(error -> {
|
|
|
|
|
if (fallback.compareAndSet(false, true)) {
|
|
|
|
|
getLogger().warning("Nie udało się usunąć części historii czatu; próbuję pojedynczo: "
|
|
|
|
|
+ error.getMessage());
|
|
|
|
|
ids.forEach(id -> channel.deleteMessageById(id).queue(null, ignored -> { }));
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}));
|
|
|
|
|
} catch (RuntimeException exception) {
|
|
|
|
|
getLogger().warning("Nie udało się usunąć historii czatu: " + exception.getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void publish(boolean online) {
|
|
|
|
|
updateWebStatus(online);
|
|
|
|
|
if (jda == null || shuttingDown) {
|
|
|
|
@@ -278,7 +444,7 @@ public final class AsminDiscordBridge extends JavaPlugin {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void openKickModal(StringSelectInteractionEvent event, String playerName) {
|
|
|
|
|
TextInput reason = TextInput.create("reason", "Powód", TextInputStyle.SHORT)
|
|
|
|
|
TextInput reason = TextInput.create("reason", "Wpisz powód kicka", TextInputStyle.SHORT)
|
|
|
|
|
.setPlaceholder("Podaj powód kicka")
|
|
|
|
|
.setRequired(true)
|
|
|
|
|
.setMaxLength(200)
|
|
|
|
@@ -289,18 +455,18 @@ public final class AsminDiscordBridge extends JavaPlugin {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void openBanModal(StringSelectInteractionEvent event, String playerName) {
|
|
|
|
|
TextInput reason = TextInput.create("reason", "Powód", TextInputStyle.SHORT)
|
|
|
|
|
TextInput reason = TextInput.create("reason", "Wpisz powód bana", TextInputStyle.SHORT)
|
|
|
|
|
.setPlaceholder("Podaj powód bana")
|
|
|
|
|
.setRequired(true)
|
|
|
|
|
.setMaxLength(200)
|
|
|
|
|
.build();
|
|
|
|
|
TextInput banIp = TextInput.create("ban-ip", "Ban IP? (tak/nie)", TextInputStyle.SHORT)
|
|
|
|
|
TextInput banIp = TextInput.create("ban-ip", "Czy chcesz też bana na IP? (tak/nie)", TextInputStyle.SHORT)
|
|
|
|
|
.setPlaceholder("tak lub nie")
|
|
|
|
|
.setRequired(true)
|
|
|
|
|
.setMaxLength(3)
|
|
|
|
|
.build();
|
|
|
|
|
event.replyModal(Modal.create("admin:ban-modal:" + playerName, "Ban Player: " + playerName)
|
|
|
|
|
.addComponents(ActionRow.of(reason, banIp))
|
|
|
|
|
.addComponents(ActionRow.of(reason), ActionRow.of(banIp))
|
|
|
|
|
.build()).queue();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -498,9 +664,11 @@ public final class AsminDiscordBridge extends JavaPlugin {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String formatPrefix(String prefix) {
|
|
|
|
|
String translated = ChatColor.translateAlternateColorCodes('&', prefix);
|
|
|
|
|
String plain = ChatColor.stripColor(translated);
|
|
|
|
|
if (plain == null || plain.isEmpty()) return "";
|
|
|
|
|
if (prefix == null) return "";
|
|
|
|
|
String translated = HEX_COLOR.matcher(prefix).replaceAll("");
|
|
|
|
|
translated = ChatColor.translateAlternateColorCodes('&', translated);
|
|
|
|
|
String plain = ChatColor.stripColor(translated).trim();
|
|
|
|
|
if (plain.isEmpty()) return "";
|
|
|
|
|
return LEGACY_COLOR.matcher(translated).find() && translated.matches("(?s).*§[lL].*")
|
|
|
|
|
? "**" + plain + "** " : plain + " ";
|
|
|
|
|
}
|
|
|
|
@@ -535,6 +703,52 @@ public final class AsminDiscordBridge extends JavaPlugin {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private final class AdminListener extends ListenerAdapter {
|
|
|
|
|
@Override
|
|
|
|
|
public void onSlashCommandInteraction(SlashCommandInteractionEvent event) {
|
|
|
|
|
if (!event.getName().equals("czytaj-chat")) return;
|
|
|
|
|
Member member = event.getMember();
|
|
|
|
|
if (member == null || !member.hasPermission(Permission.ADMINISTRATOR)) {
|
|
|
|
|
event.reply("Ta komenda wymaga uprawnień Administrator.").setEphemeral(true).queue();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (event.getGuild() == null) {
|
|
|
|
|
event.reply("Ta komenda działa tylko na serwerze.").setEphemeral(true).queue();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
OptionMapping option = event.getOption("tryb");
|
|
|
|
|
String mode = option == null ? "" : option.getAsString();
|
|
|
|
|
MessageChannel channel = event.getChannel();
|
|
|
|
|
long channelId = channel.getIdLong();
|
|
|
|
|
switch (mode) {
|
|
|
|
|
case "on" -> {
|
|
|
|
|
RelayState state = relays.computeIfAbsent(channelId, RelayState::new);
|
|
|
|
|
state.paused = false;
|
|
|
|
|
event.reply("Włączono przekazywanie czatu na tym kanale.").setEphemeral(true).queue();
|
|
|
|
|
}
|
|
|
|
|
case "pause" -> {
|
|
|
|
|
RelayState state = relays.get(channelId);
|
|
|
|
|
if (state == null || state.paused) {
|
|
|
|
|
event.reply("Przekazywanie czatu nie jest aktywne na tym kanale.").setEphemeral(true).queue();
|
|
|
|
|
} else {
|
|
|
|
|
state.paused = true;
|
|
|
|
|
event.reply("Wstrzymano przekazywanie czatu. Historia została zachowana.").setEphemeral(true).queue();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
case "off" -> {
|
|
|
|
|
RelayState state = relays.remove(channelId);
|
|
|
|
|
if (state == null) {
|
|
|
|
|
event.reply("Przekazywanie czatu nie było włączone na tym kanale.").setEphemeral(true).queue();
|
|
|
|
|
} else {
|
|
|
|
|
state.paused = true;
|
|
|
|
|
int count = state.messageIds.size();
|
|
|
|
|
deleteRelayMessages(channel, state);
|
|
|
|
|
event.reply("Wyłączono przekazywanie czatu i usuwam " + count + " wiadomości.").setEphemeral(true).queue();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
default -> event.reply("Użyj: on, off lub pause.").setEphemeral(true).queue();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onStringSelectInteraction(StringSelectInteractionEvent event) {
|
|
|
|
|
String id = event.getComponentId();
|
|
|
|
@@ -675,7 +889,9 @@ public final class AsminDiscordBridge extends JavaPlugin {
|
|
|
|
|
public void append(LogEvent event) {
|
|
|
|
|
String message = event.getMessage() == null ? null : event.getMessage().getFormattedMessage();
|
|
|
|
|
if (message == null || message.isBlank()) return;
|
|
|
|
|
add(ChatColor.stripColor(message));
|
|
|
|
|
message = ANSI_COLOR.matcher(ChatColor.stripColor(message)).replaceAll("").trim();
|
|
|
|
|
if (message.isEmpty() || message.startsWith("CONSOLE issued server command:")) return;
|
|
|
|
|
add(message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void add(String line) {
|
|
|
|
@@ -690,4 +906,15 @@ public final class AsminDiscordBridge extends JavaPlugin {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static final class RelayState {
|
|
|
|
|
private final long channelId;
|
|
|
|
|
private final List<String> pending = Collections.synchronizedList(new ArrayList<>());
|
|
|
|
|
private final List<String> messageIds = Collections.synchronizedList(new ArrayList<>());
|
|
|
|
|
private volatile boolean paused;
|
|
|
|
|
|
|
|
|
|
private RelayState(long channelId) {
|
|
|
|
|
this.channelId = channelId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|