mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-23 17:19:16 +00:00
Performance & Fixes
This commit is contained in:
@@ -170,6 +170,33 @@ public class Iris extends VolmitPlugin
|
||||
super.onEnable();
|
||||
}
|
||||
|
||||
public void onDisable()
|
||||
{
|
||||
if(IrisSettings.get().isStudio())
|
||||
{
|
||||
proj.close();
|
||||
|
||||
for(World i : Bukkit.getWorlds())
|
||||
{
|
||||
if(IrisWorlds.isIrisWorld(i))
|
||||
{
|
||||
IrisWorlds.access(i).close();
|
||||
}
|
||||
}
|
||||
|
||||
for(GroupedExecutor i : executors)
|
||||
{
|
||||
i.close();
|
||||
}
|
||||
}
|
||||
|
||||
executors.clear();
|
||||
board.disable();
|
||||
Bukkit.getScheduler().cancelTasks(this);
|
||||
HandlerList.unregisterAll((Plugin) this);
|
||||
super.onDisable();
|
||||
}
|
||||
|
||||
public static void sq(Runnable r)
|
||||
{
|
||||
synchronized(syncJobs)
|
||||
@@ -206,10 +233,10 @@ public class Iris extends VolmitPlugin
|
||||
|
||||
private void bstats()
|
||||
{
|
||||
J.s(() ->
|
||||
if(IrisSettings.get().isMetrics())
|
||||
{
|
||||
new MetricsLite(Iris.instance, 8757);
|
||||
});
|
||||
J.s(() ->new MetricsLite(Iris.instance, 8757));
|
||||
}
|
||||
}
|
||||
|
||||
public static File getTemp()
|
||||
@@ -217,33 +244,6 @@ public class Iris extends VolmitPlugin
|
||||
return instance.getDataFolder("cache", "temp");
|
||||
}
|
||||
|
||||
public void onDisable()
|
||||
{
|
||||
if(IrisSettings.get().isStudio())
|
||||
{
|
||||
proj.close();
|
||||
|
||||
for(World i : Bukkit.getWorlds())
|
||||
{
|
||||
if(IrisWorlds.isIrisWorld(i))
|
||||
{
|
||||
IrisWorlds.access(i).close();
|
||||
}
|
||||
}
|
||||
|
||||
for(GroupedExecutor i : executors)
|
||||
{
|
||||
i.close();
|
||||
}
|
||||
}
|
||||
|
||||
executors.clear();
|
||||
board.disable();
|
||||
Bukkit.getScheduler().cancelTasks(this);
|
||||
HandlerList.unregisterAll((Plugin) this);
|
||||
super.onDisable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
|
||||
{
|
||||
@@ -410,6 +410,11 @@ public class Iris extends VolmitPlugin
|
||||
|
||||
public void splash()
|
||||
{
|
||||
if(!IrisSettings.get().isSplash())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// @NoArgsConstructor
|
||||
String padd = Form.repeat(" ", 8);
|
||||
String padd2 = Form.repeat(" ", 4);
|
||||
|
||||
Reference in New Issue
Block a user