From 9ecb9fb49d630c120fbb8ee85660e8fda509b25b Mon Sep 17 00:00:00 2001 From: Abwasserrohr <44294954+Abwasserrohr@users.noreply.github.com> Date: Fri, 15 Mar 2019 17:41:59 +0100 Subject: [PATCH] Added reportfalsedirectory This file is going to report if it is not located in the right directory. This allows the server operator to easily detect if SKYBLOCK.SK is not corretly located on the server. --- .../Functions/reportfalsedirectory.sk | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 SkyBlock/SKYBLOCK.SK/Functions/reportfalsedirectory.sk diff --git a/SkyBlock/SKYBLOCK.SK/Functions/reportfalsedirectory.sk b/SkyBlock/SKYBLOCK.SK/Functions/reportfalsedirectory.sk new file mode 100644 index 00000000..09fcd36e --- /dev/null +++ b/SkyBlock/SKYBLOCK.SK/Functions/reportfalsedirectory.sk @@ -0,0 +1,26 @@ +# +# ============== +# reportfalsedirectory.sk +# ============== +# reportfalsedirectory.sk is part of the SKYBLOCK.SK functions. +# ============== + +import: + java.io.File + +# +# > Event - on load +# > Actions: +# > Detects if this file is not in the right folder and reports it to the chat of +# > the server to inform the server operator about it. Repeating the error every +# > 10 seconds until the file is at the right spot, which stops the while loop. +on load: + while new File("plugins/Skript/scripts/SkyBlock/SKYBLOCK.SK/Functions/reportfalsedirectory.sk").exists() is false: + broadcast "[SKYBLOCK.SK] Error occured: Files aren't at the supported location." + broadcast "[SKYBLOCK.SK] Put the SkyBlock folder into the supported directory:" + broadcast "[SKYBLOCK.SK] plugins/Skript/scripts/SkyBlock/SKYBLOCK.SK/..." + broadcast "[SKYBLOCK.SK] plugins/Skript/scripts/SkyBlock/lang/..." + broadcast "[SKYBLOCK.SK] plugins/Skript/scripts/SkyBlock/islands/..." + broadcast "[SKYBLOCK.SK] plugins/Skript/scripts/SkyBlock/config/..." + broadcast "[SKYBLOCK.SK] plugins/Skript/scripts/SkyBlock/addons/..." + wait 10 seconds