mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 10:14:42 +02:00
Encapsulation and Magic Values (#2711)
* Encapsulate attributes of PlotArea using lombok Getters/Setters * Limit access to collections, don't expose implementation details * Better naming for some boolean attributes * Replace magic type value with PlotAreaType enum * Replace magic terrain value with PlotAreaTerrainType enum * Fix remaining rebase conflicts * Reduce code duplication Co-authored-by: Alexander Söderberg <Sauilitired@users.noreply.github.com>
This commit is contained in:
@ -106,7 +106,7 @@ public class SpongePlotGenerator
|
||||
}
|
||||
|
||||
@Override public void augment(PlotArea area) {
|
||||
SpongeAugmentedGenerator.get(SpongeUtil.getWorld(area.worldname));
|
||||
SpongeAugmentedGenerator.get(SpongeUtil.getWorld(area.getWorldName()));
|
||||
}
|
||||
|
||||
@Override public boolean isFull() {
|
||||
|
@ -85,7 +85,7 @@ public class SpongeTerrainGen
|
||||
}
|
||||
|
||||
@Override public void augment(PlotArea area) {
|
||||
SpongeAugmentedGenerator.get(SpongeUtil.getWorld(area.worldname));
|
||||
SpongeAugmentedGenerator.get(SpongeUtil.getWorld(area.getWorldName()));
|
||||
}
|
||||
|
||||
@Override public boolean isFull() {
|
||||
|
@ -56,7 +56,7 @@ public class SpongeEventUtil extends EventUtil {
|
||||
}
|
||||
|
||||
@Override public boolean callUnlink(PlotArea area, ArrayList<PlotId> plots) {
|
||||
return callEvent(new PlotUnlinkEvent(SpongeUtil.getWorld(area.worldname), plots));
|
||||
return callEvent(new PlotUnlinkEvent(SpongeUtil.getWorld(area.getWorldName()), plots));
|
||||
}
|
||||
|
||||
@Override public void callEntry(PlotPlayer player, Plot plot) {
|
||||
|
@ -59,7 +59,7 @@ public class SpongeSetupUtils extends SetupUtils {
|
||||
if (SetupUtils.generators.isEmpty()) {
|
||||
updateGenerators();
|
||||
}
|
||||
World world = SpongeUtil.getWorld(plotArea.worldname);
|
||||
World world = SpongeUtil.getWorld(plotArea.getWorldName());
|
||||
if (world == null) {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user