9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-26 18:49:06 +00:00

Placement flags

This commit is contained in:
Daniel Mills
2020-01-08 04:01:05 -05:00
parent 0d55247dd9
commit c620a9388f
6 changed files with 64 additions and 3 deletions

View File

@@ -111,6 +111,11 @@ public class Iris extends JavaPlugin implements Listener
private static File internalResource(String resource)
{
if(new File(Iris.instance.getDataFolder(), "pack").exists())
{
return new File(Iris.instance.getDataFolder(), resource);
}
return new File(System.getProperty("java.io.tmpdir") + "/Iris/" + resource);
}
@@ -281,13 +286,14 @@ public class Iris extends JavaPlugin implements Listener
if(internal.exists())
{
L.v("Loading Resource: " + "Iris/" + string);
L.v("Loading Resource: " + internal.getAbsolutePath());
L.flush();
return new FileInputStream(internal);
}
else
{
L.f("Cannot find Resource: " + string);
L.f("Cannot find Resource: " + internal.getAbsolutePath());
return null;
}
}