mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-02-12 03:59:22 +00:00
World comparisons (working towards cross world plot moving)
This commit is contained in:
parent
a24aa2fccb
commit
49f8ffaed4
1 changed files with 14 additions and 0 deletions
|
@ -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 a new issue