fix some stuff
This commit is contained in:
parent
f52cb01f2b
commit
fdc25e3dce
19 changed files with 28 additions and 3 deletions
|
|
@ -11,6 +11,8 @@ import java.io.FileInputStream;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
|
@ -21,6 +23,7 @@ public final class GrimmsServer extends JavaPlugin {
|
|||
public static JavaPlugin instance;
|
||||
public static Logger logger;
|
||||
public static PluginDataStorage pds;
|
||||
public static List<Function<JavaPlugin,String>> hotReloadFuncs;
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
|
|
@ -40,6 +43,14 @@ public final class GrimmsServer extends JavaPlugin {
|
|||
// Plugin shutdown logic
|
||||
}
|
||||
|
||||
public String[] fullHotReload(){
|
||||
String[] rt = new String[hotReloadFuncs.size()];
|
||||
for (int i = 0; i < hotReloadFuncs.size(); i++) {
|
||||
rt[i] = hotReloadFuncs.get(i).apply(instance);
|
||||
}
|
||||
return rt;
|
||||
}
|
||||
|
||||
public void copyResourceFiles() {
|
||||
// Check if version.embed exists
|
||||
File versionEmbedFile = new File("" + getDataFolder() + File.separatorChar + "embed" + File.separatorChar + "version.embed");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue