mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-28 12:07:46 +01:00
Actually report game rule values.
Was just "<Recursive>" before, which is pretty useless.
This commit is contained in:
parent
54c3cdad77
commit
ee7dc27283
@ -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
|
||||
*/
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user