mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Fixes
This commit is contained in:
parent
a27bb66fef
commit
ccd59278e5
@ -4,6 +4,7 @@
|
|||||||
-libraryjars 'C:\Program Files\Java\jre1.8.0_221\lib\rt.jar'
|
-libraryjars 'C:\Program Files\Java\jre1.8.0_221\lib\rt.jar'
|
||||||
-libraryjars lib
|
-libraryjars lib
|
||||||
|
|
||||||
|
-dontwarn org.slf4j.**
|
||||||
-dontskipnonpubliclibraryclassmembers
|
-dontskipnonpubliclibraryclassmembers
|
||||||
-dontshrink
|
-dontshrink
|
||||||
-optimizations !code/simplification/advanced,code/simplification/*
|
-optimizations !code/simplification/advanced,code/simplification/*
|
||||||
|
5
pom.xml
5
pom.xml
@ -43,11 +43,6 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<minimizeJar>false</minimizeJar>
|
<minimizeJar>false</minimizeJar>
|
||||||
<artifactSet>
|
|
||||||
<excludes>
|
|
||||||
<exclude>org.slf4j:*</exclude>
|
|
||||||
</excludes>
|
|
||||||
</artifactSet>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
@ -133,20 +133,24 @@ public class Iris extends MortarPlugin
|
|||||||
|
|
||||||
public void onDisable()
|
public void onDisable()
|
||||||
{
|
{
|
||||||
proj.close();
|
if(IrisSettings.get().isStudio())
|
||||||
|
|
||||||
for(World i : Bukkit.getWorlds())
|
|
||||||
{
|
{
|
||||||
if(i.getGenerator() instanceof IrisChunkGenerator)
|
proj.close();
|
||||||
|
|
||||||
|
for(World i : Bukkit.getWorlds())
|
||||||
{
|
{
|
||||||
((IrisChunkGenerator) i.getGenerator()).close();
|
if(i.getGenerator() instanceof IrisChunkGenerator)
|
||||||
|
{
|
||||||
|
((IrisChunkGenerator) i.getGenerator()).close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(GroupedExecutor i : executors)
|
||||||
|
{
|
||||||
|
i.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(GroupedExecutor i : executors)
|
|
||||||
{
|
|
||||||
i.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
executors.clear();
|
executors.clear();
|
||||||
board.disable();
|
board.disable();
|
||||||
Bukkit.getScheduler().cancelTasks(this);
|
Bukkit.getScheduler().cancelTasks(this);
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
package com.volmit.iris.command;
|
package com.volmit.iris.command;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.WorldCreator;
|
import org.bukkit.WorldCreator;
|
||||||
import org.bukkit.WorldType;
|
import org.bukkit.WorldType;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.zeroturnaround.zip.ZipUtil;
|
import org.zeroturnaround.zip.ZipUtil;
|
||||||
|
import org.zeroturnaround.zip.commons.FileUtils;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.IrisDataManager;
|
import com.volmit.iris.IrisDataManager;
|
||||||
@ -15,6 +16,7 @@ import com.volmit.iris.IrisSettings;
|
|||||||
import com.volmit.iris.gen.IrisChunkGenerator;
|
import com.volmit.iris.gen.IrisChunkGenerator;
|
||||||
import com.volmit.iris.object.IrisDimension;
|
import com.volmit.iris.object.IrisDimension;
|
||||||
import com.volmit.iris.util.Form;
|
import com.volmit.iris.util.Form;
|
||||||
|
import com.volmit.iris.util.IO;
|
||||||
import com.volmit.iris.util.J;
|
import com.volmit.iris.util.J;
|
||||||
import com.volmit.iris.util.MortarCommand;
|
import com.volmit.iris.util.MortarCommand;
|
||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
@ -86,7 +88,38 @@ public class CommandIrisCreate extends MortarCommand
|
|||||||
Iris.globaldata.dump();
|
Iris.globaldata.dump();
|
||||||
Iris.globaldata.preferFolder(null);
|
Iris.globaldata.preferFolder(null);
|
||||||
Iris.proj.downloadSearch(sender, type, false);
|
Iris.proj.downloadSearch(sender, type, false);
|
||||||
ZipUtil.unpack(Iris.proj.compilePackage(sender, type, true, true), iris);
|
File downloaded = Iris.instance.getDataFolder("packs", type);
|
||||||
|
|
||||||
|
for(File i : downloaded.listFiles())
|
||||||
|
{
|
||||||
|
if(i.isFile())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
FileUtils.copyFile(i, new File(iris, i.getName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
catch(IOException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
FileUtils.copyDirectory(i, new File(iris, i.getName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
catch(IOException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IO.delete(downloaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!dimf.exists() || !dimf.isFile())
|
if(!dimf.exists() || !dimf.isFile())
|
||||||
@ -169,27 +202,11 @@ public class CommandIrisCreate extends MortarCommand
|
|||||||
{
|
{
|
||||||
world.save();
|
world.save();
|
||||||
|
|
||||||
for(Player i : world.getPlayers())
|
|
||||||
{
|
|
||||||
i.kickPlayer("Please Rejoin in a different world.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!Bukkit.unloadWorld(world, true))
|
|
||||||
{
|
|
||||||
sender.sendMessage("Couldn't unload the world for some reason.... Aborting zip.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(Iris.linkMultiverseCore.supported())
|
if(Iris.linkMultiverseCore.supported())
|
||||||
{
|
{
|
||||||
Iris.linkMultiverseCore.addWorld(worldName, dimm, seedd + "");
|
Iris.linkMultiverseCore.addWorld(worldName, dimm, seedd + "");
|
||||||
sender.sendMessage("Added " + worldName + " to MultiverseCore.");
|
sender.sendMessage("Added " + worldName + " to MultiverseCore.");
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sender.sendMessage("No MVC?");
|
|
||||||
}
|
|
||||||
|
|
||||||
sender.sendMessage("All Done!");
|
sender.sendMessage("All Done!");
|
||||||
});
|
});
|
||||||
|
@ -21,6 +21,12 @@ public class CommandIrisPregen extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
|
if(args.length == 0)
|
||||||
|
{
|
||||||
|
sender.sendMessage("/iris pregen <blocks-wide|stop>");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(args[0].equalsIgnoreCase("stop"))
|
if(args[0].equalsIgnoreCase("stop"))
|
||||||
{
|
{
|
||||||
if(PregenJob.task == -1)
|
if(PregenJob.task == -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user