mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 13:33:54 +00:00
Fixed Flatlands generation & Discord bot not actually disabled (#215)
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
package me.totalfreedom.totalfreedommod;
|
||||
|
||||
import com.sk89q.worldedit.bukkit.BukkitConfiguration;
|
||||
import java.io.File;
|
||||
import me.totalfreedom.totalfreedommod.config.YamlConfig;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.util.FileUtil;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
public class BackupManager extends FreedomService
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ public class Discord extends FreedomService
|
||||
{
|
||||
public static HashMap<String, PlayerData> LINK_CODES = new HashMap<>();
|
||||
public static HashMap<String, PlayerData> VERIFICATION_CODES = new HashMap<>();
|
||||
public ScheduledThreadPoolExecutor RATELIMIT_EXECUTOR = new ScheduledThreadPoolExecutor(5, new CountingThreadFactory(this::poolIdentifier, "RateLimit"));
|
||||
public ScheduledThreadPoolExecutor RATELIMIT_EXECUTOR;
|
||||
public List<CompletableFuture<Message>> sentMessages = new ArrayList<>();
|
||||
|
||||
public static JDA bot = null;
|
||||
@ -68,6 +68,7 @@ public class Discord extends FreedomService
|
||||
}
|
||||
if (bot != null)
|
||||
{
|
||||
RATELIMIT_EXECUTOR = new ScheduledThreadPoolExecutor(5, new CountingThreadFactory(this::poolIdentifier, "RateLimit")); // To avoid ClassNotFoundException as net.dv8tion.jda.internal.utils.concurrent.CountingThreadFactory doesn't exist.
|
||||
for (Object object : bot.getRegisteredListeners())
|
||||
{
|
||||
bot.removeEventListener(object);
|
||||
|
Reference in New Issue
Block a user