geforkt von SteamWar/BungeeCore
Merge pull request 'Making listener stuff volatile to fix NPE's with multiple threads accessing them' (#253) from BetterInit into master
Reviewed-on: SteamWar/BungeeCore#253 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
f270985f8f
@ -55,13 +55,13 @@ public class SteamwarDiscordBot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private AnnouncementListener announcementListener;
|
private volatile AnnouncementListener announcementListener;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private IngameChatListener ingameChatListener;
|
private volatile IngameChatListener ingameChatListener;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private ServerTeamChatListener serverTeamChatListener;
|
private volatile ServerTeamChatListener serverTeamChatListener;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private final JDA jda;
|
private final JDA jda;
|
||||||
@ -100,7 +100,6 @@ public class SteamwarDiscordBot {
|
|||||||
DiscordRolesMessage.sendMessage();
|
DiscordRolesMessage.sendMessage();
|
||||||
DiscordRulesMessage.sendMessage();
|
DiscordRulesMessage.sendMessage();
|
||||||
DiscordTicketMessage.sendMessage();
|
DiscordTicketMessage.sendMessage();
|
||||||
|
|
||||||
new RolesInteractionButtonListener();
|
new RolesInteractionButtonListener();
|
||||||
new DiscordTicketListener();
|
new DiscordTicketListener();
|
||||||
new DiscordAuthListener();
|
new DiscordAuthListener();
|
||||||
@ -109,7 +108,6 @@ public class SteamwarDiscordBot {
|
|||||||
ingameChatListener = new IngameChatListener();
|
ingameChatListener = new IngameChatListener();
|
||||||
serverTeamChatListener = new ServerTeamChatListener();
|
serverTeamChatListener = new ServerTeamChatListener();
|
||||||
new SlashCommandListener();
|
new SlashCommandListener();
|
||||||
|
|
||||||
jda.retrieveCommands().complete().forEach(command -> jda.deleteCommandById(command.getId()).queue());
|
jda.retrieveCommands().complete().forEach(command -> jda.deleteCommandById(command.getId()).queue());
|
||||||
|
|
||||||
Guild guild = jda.getGuildById(SteamwarDiscordBotConfig.GUILD);
|
Guild guild = jda.getGuildById(SteamwarDiscordBotConfig.GUILD);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren