Skip to content

Commit

Permalink
⚡ Added a reloading message to know when a Skript file is reloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsTheSky committed Aug 28, 2021
1 parent 83ab71c commit 881f8a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/info/itsthesky/skar/api/FileWatcher.java
Expand Up @@ -36,8 +36,10 @@ public void doOnChange(File file) {

if (shouldExecute.get()) {
shouldExecute.set(false);
Skar.log("Reloading Script file " + file.getPath() +" ...");
Skar.debug("File changed: " + file.getPath());
ScriptLoader.reloadScript(file);
Skar.success("Reload success! Check above if there's any Skript error.");
Bukkit.getScheduler().runTaskLater(Skar.getInstance(),
() -> shouldExecute.set(true),
1);
Expand Down

0 comments on commit 881f8a4

Please sign in to comment.