Bugfixes / Copy over plugins to mod folder
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package io.anuke.mindustry.server;
|
||||
|
||||
import io.anuke.arc.*;
|
||||
import io.anuke.arc.files.*;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.mindustry.*;
|
||||
import io.anuke.mindustry.core.*;
|
||||
import io.anuke.mindustry.mod.*;
|
||||
@@ -20,6 +22,15 @@ public class MindustryServer implements ApplicationListener{
|
||||
loadLocales = false;
|
||||
headless = true;
|
||||
|
||||
FileHandle plugins = Core.settings.getDataDirectory().child("plugins");
|
||||
if(plugins.isDirectory() && plugins.list().length > 0 && !plugins.sibling("mods").exists()){
|
||||
Log.warn("[IMPORTANT NOTICE] &lrPlugins have been detected.&ly Automatically moving all contents of the plugin folder into the 'mods' folder. The original folder will not be removed; please do so manually.");
|
||||
plugins.sibling("mods").mkdirs();
|
||||
for(FileHandle file : plugins.list()){
|
||||
file.copyTo(plugins.sibling("mods"));
|
||||
}
|
||||
}
|
||||
|
||||
Vars.loadSettings();
|
||||
Vars.init();
|
||||
content.createContent();
|
||||
|
||||
@@ -751,8 +751,7 @@ public class ServerControl implements ApplicationListener{
|
||||
});
|
||||
|
||||
mods.each(p -> p.registerServerCommands(handler));
|
||||
//TODO
|
||||
//plugins.each(p -> p.registerClientCommands(netServer.clientCommands));
|
||||
mods.each(p -> p.registerClientCommands(netServer.clientCommands));
|
||||
}
|
||||
|
||||
private void readCommands(){
|
||||
|
||||
Reference in New Issue
Block a user