Try redirect users to discord if PL is down

This commit is contained in:
libraryaddict 2021-02-09 16:39:12 +13:00
parent 808b618ecf
commit ef4539a3a1
2 changed files with 6 additions and 0 deletions

View File

@ -85,6 +85,9 @@ public class LibsDisguises extends JavaPlugin {
getLogger().severe("Please restart the server to complete the ProtocolLib update!"); getLogger().severe("Please restart the server to complete the ProtocolLib update!");
} }
} catch (Exception e) { } catch (Exception e) {
getLogger()
.severe("Looks like ProtocolLib's site may be down! MythicCraft/MythicMobs has a discord server https://discord.gg/EErRhJ4qgx you can " +
"join. Check the pins in #libs-support for a ProtocolLib.jar you can download!");
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -70,6 +70,9 @@ public class LDUpdateProtocolLib implements LDCommand {
new BukkitRunnable() { new BukkitRunnable() {
@Override @Override
public void run() { public void run() {
sender.sendMessage(ChatColor.RED +
"Looks like ProtocolLib's site may be down! MythicCraft/MythicMobs has a discord server https://discord.gg/EErRhJ4qgx you" +
" can join. Check the pins in #libs-support for a ProtocolLib.jar you can download!");
sender.sendMessage(ChatColor.RED + "Update failed, " + ex.getMessage()); sender.sendMessage(ChatColor.RED + "Update failed, " + ex.getMessage());
} }
}.runTask(LibsDisguises.getInstance()); }.runTask(LibsDisguises.getInstance());