Kill Discord properly

This commit is contained in:
Business Goose 2022-03-29 23:50:55 +01:00
parent 8c111240e6
commit b984b700e0
No known key found for this signature in database
GPG key ID: 77DCA801362E9645

View file

@ -2,6 +2,7 @@ package me.StevenLawson.TotalFreedomMod.commands;
import me.StevenLawson.TotalFreedomMod.config.ConfigurationEntry;
import me.StevenLawson.TotalFreedomMod.config.MainConfig;
import me.StevenLawson.TotalFreedomMod.discord.bridge.DiscordBridge;
import me.StevenLawson.TotalFreedomMod.util.SynchronousUtil;
import me.StevenLawson.TotalFreedomMod.util.Utilities;
import org.bukkit.Bukkit;
@ -27,6 +28,7 @@ public class Command_updatetfm extends FreedomCommand {
ProcessBuilder proc = new ProcessBuilder("/bin/bash", "-c", command);
Process process = proc.start();
process.waitFor();
DiscordBridge.transmitMessage("**TFM is being reloaded...**", true);
playerMsg(sender, "Compiled TFM! Reloading...");
Utilities.adminAction(sender.getName(), "Compilation successful, reloading TFM...", false);
for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {