mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-18 14:50:57 +00:00
- Added DiskSpace to Splash
- Changed form ofSize to contain a space
This commit is contained in:
@@ -788,6 +788,7 @@ public class Iris extends VolmitPlugin implements Listener {
|
|||||||
padd + C.GRAY + " " + C.DARK_GRAY + "@@@" + C.GRAY + "@@@@@@@@@@@@@@"
|
padd + C.GRAY + " " + C.DARK_GRAY + "@@@" + C.GRAY + "@@@@@@@@@@@@@@"
|
||||||
};
|
};
|
||||||
String[] splash;
|
String[] splash;
|
||||||
|
File freeSpace = new File(Bukkit.getWorldContainer() + ".");
|
||||||
if (unstablemode) {
|
if (unstablemode) {
|
||||||
splash = splashunstable;
|
splash = splashunstable;
|
||||||
} else if (warningmode) {
|
} else if (warningmode) {
|
||||||
@@ -835,6 +836,7 @@ public class Iris extends VolmitPlugin implements Listener {
|
|||||||
|
|
||||||
Iris.info("Process Threads: " + getCPUThreads());
|
Iris.info("Process Threads: " + getCPUThreads());
|
||||||
Iris.info("Process Memory: " + getHardware.getProcessMemory() + " MB");
|
Iris.info("Process Memory: " + getHardware.getProcessMemory() + " MB");
|
||||||
|
Iris.info("Free DiskSpace: " + Form.ofSize(freeSpace.getFreeSpace(), 1024));
|
||||||
if (getHardware.getProcessMemory() < 5999) {
|
if (getHardware.getProcessMemory() < 5999) {
|
||||||
Iris.warn("6GB+ Ram is recommended");
|
Iris.warn("6GB+ Ram is recommended");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -683,23 +683,23 @@ public class Form {
|
|||||||
*/
|
*/
|
||||||
public static String ofSize(long s, int div) {
|
public static String ofSize(long s, int div) {
|
||||||
double d = (double) s;
|
double d = (double) s;
|
||||||
String sub = "Bytes";
|
String sub = " Bytes";
|
||||||
|
|
||||||
if (d > div - 1) {
|
if (d > div - 1) {
|
||||||
d /= div;
|
d /= div;
|
||||||
sub = "KB";
|
sub = " KB";
|
||||||
|
|
||||||
if (d > div - 1) {
|
if (d > div - 1) {
|
||||||
d /= div;
|
d /= div;
|
||||||
sub = "MB";
|
sub = " MB";
|
||||||
|
|
||||||
if (d > div - 1) {
|
if (d > div - 1) {
|
||||||
d /= div;
|
d /= div;
|
||||||
sub = "GB";
|
sub = " GB";
|
||||||
|
|
||||||
if (d > div - 1) {
|
if (d > div - 1) {
|
||||||
d /= div;
|
d /= div;
|
||||||
sub = "TB";
|
sub = " TB";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user