mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-19 14:42:42 +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 + "@@@@@@@@@@@@@@"
|
||||
};
|
||||
String[] splash;
|
||||
File freeSpace = new File(Bukkit.getWorldContainer() + ".");
|
||||
if (unstablemode) {
|
||||
splash = splashunstable;
|
||||
} else if (warningmode) {
|
||||
@@ -835,6 +836,7 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
|
||||
Iris.info("Process Threads: " + getCPUThreads());
|
||||
Iris.info("Process Memory: " + getHardware.getProcessMemory() + " MB");
|
||||
Iris.info("Free DiskSpace: " + Form.ofSize(freeSpace.getFreeSpace(), 1024));
|
||||
if (getHardware.getProcessMemory() < 5999) {
|
||||
Iris.warn("6GB+ Ram is recommended");
|
||||
}
|
||||
|
||||
@@ -683,23 +683,23 @@ public class Form {
|
||||
*/
|
||||
public static String ofSize(long s, int div) {
|
||||
double d = (double) s;
|
||||
String sub = "Bytes";
|
||||
String sub = " Bytes";
|
||||
|
||||
if (d > div - 1) {
|
||||
d /= div;
|
||||
sub = "KB";
|
||||
sub = " KB";
|
||||
|
||||
if (d > div - 1) {
|
||||
d /= div;
|
||||
sub = "MB";
|
||||
sub = " MB";
|
||||
|
||||
if (d > div - 1) {
|
||||
d /= div;
|
||||
sub = "GB";
|
||||
sub = " GB";
|
||||
|
||||
if (d > div - 1) {
|
||||
d /= div;
|
||||
sub = "TB";
|
||||
sub = " TB";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user