Package net.lapismc.lapiscore.utils
Class LapisCoreFileWatcher
- java.lang.Object
-
- net.lapismc.lapiscore.utils.LapisCoreFileWatcher
-
public class LapisCoreFileWatcher extends java.lang.ObjectAn utility class for reloading files when they are edited
-
-
Constructor Summary
Constructors Constructor Description LapisCoreFileWatcher(LapisCorePlugin core)Start the file watcher
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckOtherFile(java.io.File f)Override this method to deal with an unhandled file being edited This will only be fired for unknown files, it will not trigger when config or messages files are editedvoidfileUpdate(java.io.File f)Override this method to deal with a file being edited This will be fired for every file change, including config.yml and messages.yml filesvoidstop()Used to safely stop the file watcher
-
-
-
Constructor Detail
-
LapisCoreFileWatcher
public LapisCoreFileWatcher(LapisCorePlugin core)
Start the file watcher- Parameters:
core- The LapisCorePlugin that the file watcher should be registered to
-
-
Method Detail
-
stop
public void stop()
Used to safely stop the file watcher
-
fileUpdate
public void fileUpdate(java.io.File f)
Override this method to deal with a file being edited This will be fired for every file change, including config.yml and messages.yml files- Parameters:
f- The file that has been updated
-
checkOtherFile
public void checkOtherFile(java.io.File f)
Override this method to deal with an unhandled file being edited This will only be fired for unknown files, it will not trigger when config or messages files are edited- Parameters:
f- The file that has been updated
-
-