Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.12' into 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ErdbeerbaerLP committed Oct 19, 2022
2 parents 806086e + f2cec08 commit f2762d9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public DiscordIntegration() {
@Mod.EventHandler
public void modConstruction(FMLConstructionEvent ev) {
try {
Configuration.instance().loadConfig();
Discord.loadConfigs();
if (!Configuration.instance().general.botToken.equals("INSERT BOT TOKEN HERE")) { //Prevent events when token not set
MinecraftForge.EVENT_BUS.register(this);
} else {
Expand Down Expand Up @@ -331,7 +331,8 @@ public void playerLeave(PlayerEvent.PlayerLoggedOutEvent ev) {
else if (discord_instance != null && timeouts.contains(ev.player.getUniqueID())) {
discord_instance.sendMessage(Localization.instance().playerTimeout.replace("%player%", ForgeMessageUtils.formatPlayerName(ev.player)));
//Fix for buggy timeouts causing leftovers in the timeout list
timeouts.forEach(e -> {
ArrayList<UUID> tempList = new ArrayList<>(timeouts); // iterating temp list to prevent ConcurrentModificationException
tempList.forEach(e -> {
if (e.equals(ev.player.getUniqueID())) {
timeouts.remove(e);
}
Expand Down

0 comments on commit f2762d9

Please sign in to comment.