mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
use equals
This commit is contained in:
parent
49f8ffaed4
commit
844afb0183
@ -94,7 +94,18 @@ public abstract class PlotWorld {
|
||||
this.worldname = worldname;
|
||||
}
|
||||
|
||||
public boolean compare(PlotWorld plotworld) {
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
PlotWorld plotworld = (PlotWorld) obj;
|
||||
ConfigurationSection section = PlotSquared.config.getConfigurationSection("worlds");
|
||||
for (ConfigurationNode setting : plotworld.getSettingNodes()) {
|
||||
Object constant = section.get(plotworld.worldname + "." + setting.getConstant());
|
||||
|
Loading…
Reference in New Issue
Block a user