mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Move world settings dump to a better location (where all of the fields will actually have been set)
This commit is contained in:
parent
e06429f3b0
commit
36948ed351
@ -114,28 +114,5 @@ public abstract class ClassicPlotWorld extends SquarePlotWorld {
|
||||
this.WALL_FILLING = new BlockBucket(config.getString("wall.filling"));
|
||||
this.WALL_HEIGHT = Math.min(254, config.getInt("wall.height"));
|
||||
this.CLAIMED_WALL_BLOCK = new BlockBucket(config.getString("wall.block_claimed"));
|
||||
|
||||
// Dump world settings
|
||||
if (Settings.DEBUG) {
|
||||
PlotSquared.debug(String.format("- Dumping settings for ClassicPlotWorld with name %s",
|
||||
this.getWorldName()));
|
||||
final Field[] fields = this.getClass().getFields();
|
||||
for (final Field field : fields) {
|
||||
final String name = field.getName().toLowerCase(Locale.ENGLISH);
|
||||
if (name.contains("g_sch")) {
|
||||
continue;
|
||||
}
|
||||
Object value;
|
||||
try {
|
||||
final boolean accessible = field.isAccessible();
|
||||
field.setAccessible(true);
|
||||
value = field.get(this);
|
||||
field.setAccessible(accessible);
|
||||
} catch (final IllegalAccessException e) {
|
||||
value = String.format("Failed to parse: %s", e.getMessage());
|
||||
}
|
||||
PlotSquared.debug(String.format("-- %s = %s", name, value));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ package com.plotsquared.core.generator;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.ConfigurationSection;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
import com.plotsquared.core.plot.PlotArea;
|
||||
@ -52,7 +53,9 @@ import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
|
||||
public class HybridPlotWorld extends ClassicPlotWorld {
|
||||
|
||||
@ -157,6 +160,29 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
||||
event.printStackTrace();
|
||||
PlotSquared.debug("&c - road schematics are disabled for this world.");
|
||||
}
|
||||
|
||||
// Dump world settings
|
||||
if (Settings.DEBUG) {
|
||||
PlotSquared.debug(String.format("- Dumping settings for ClassicPlotWorld with name %s",
|
||||
this.getWorldName()));
|
||||
final Field[] fields = this.getClass().getFields();
|
||||
for (final Field field : fields) {
|
||||
final String name = field.getName().toLowerCase(Locale.ENGLISH);
|
||||
if (name.contains("g_sch")) {
|
||||
continue;
|
||||
}
|
||||
Object value;
|
||||
try {
|
||||
final boolean accessible = field.isAccessible();
|
||||
field.setAccessible(true);
|
||||
value = field.get(this);
|
||||
field.setAccessible(accessible);
|
||||
} catch (final IllegalAccessException e) {
|
||||
value = String.format("Failed to parse: %s", e.getMessage());
|
||||
}
|
||||
PlotSquared.debug(String.format("-- %s = %s", name, value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override public boolean isCompatible(PlotArea plotArea) {
|
||||
|
Loading…
Reference in New Issue
Block a user