mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
World comparisons (working towards cross world plot moving)
This commit is contained in:
parent
a24aa2fccb
commit
49f8ffaed4
@ -93,6 +93,20 @@ public abstract class PlotWorld {
|
||||
public PlotWorld(final String worldname) {
|
||||
this.worldname = worldname;
|
||||
}
|
||||
|
||||
public boolean compare(PlotWorld plotworld) {
|
||||
ConfigurationSection section = PlotSquared.config.getConfigurationSection("worlds");
|
||||
for (ConfigurationNode setting : plotworld.getSettingNodes()) {
|
||||
Object constant = section.get(plotworld.worldname + "." + setting.getConstant());
|
||||
if (constant == null) {
|
||||
return false;
|
||||
}
|
||||
if (!constant.equals(section.get(this.worldname + "." + setting.getConstant()))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* When a world is created, the following method will be called for each
|
||||
|
Loading…
Reference in New Issue
Block a user