Actually report game rule values.

Was just "<Recursive>" before, which is pretty useless.
This commit is contained in:
wizjany 2019-03-07 17:44:20 -05:00
parent 54c3cdad77
commit ee7dc27283
2 changed files with 7 additions and 3 deletions

View File

@ -91,7 +91,7 @@ public void appendBasics() {
*/
public void appendFlags() {
builder.append(Style.BLUE);
builder.append("FlagUtil: ");
builder.append("Flags: ");
appendFlagsList(true);
@ -99,7 +99,7 @@ public void appendFlags() {
}
/**
* Append just the list of flags (without "FlagUtil:"), including colors.
* Append just the list of flags (without "Flags:"), including colors.
*
* @param useColors true to use colors
*/

View File

@ -24,7 +24,9 @@
import org.bukkit.World;
import org.bukkit.generator.ChunkGenerator;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class WorldReport extends DataReport {
@ -67,7 +69,9 @@ public WorldReport() {
DataReport protection = new DataReport("Protection");
protection.append("PVP?", world.getPVP());
protection.append("Game Rules", world.getGameRules());
protection.append("Game Rules", Arrays.stream(world.getGameRules())
.map(name -> name + "=" + world.getGameRuleValue(name))
.collect(Collectors.joining(", ")));
report.append(protection.getTitle(), protection);
append(report.getTitle(), report);