public String generateProgressBar() { int total = getSizeX() * getSizeY() * getSizeZ(); // Area double percentage = this.visitedBlocks / total; StringBuilder progBar = new StringBuilder(); progBar.append(Math.round(percentage * 100)).append("% ["); // 0.1 becomes 10 int bars = (int) percentage * 10; // 0.1 becomes 1 for (int bar = 1; bar <= 10; bar++) { if (bars >= bar) { progBar.append('#'); } else { progBar.append('_'); } } progBar.append(']'); return progBar.toString(); }
Monthly Archives: October 2013
Releasing Karma v1.0
Karma is now available for download from the official Bukkit plugins repository. I have decided to release it there to help out other server administrators who need a rock-solid auto ranking system. This version, v1.0, also comes with a plethora of fixes and new features.
Warhub Webshow MineZ S1E1
This is our first video in our new MineZ series where we play on the MineZ zombie survival server over on shotbow.