mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Pick up the rest of the reformating
This commit is contained in:
parent
5e842f1572
commit
cbe46539ca
@ -28,18 +28,18 @@ package com.plotsquared.core;
|
||||
import com.plotsquared.core.generator.GeneratorWrapper;
|
||||
import com.plotsquared.core.generator.HybridUtils;
|
||||
import com.plotsquared.core.generator.IndependentPlotGenerator;
|
||||
import com.plotsquared.core.util.logger.ILogger;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.queue.QueueProvider;
|
||||
import com.plotsquared.core.util.ChatManager;
|
||||
import com.plotsquared.core.util.ChunkManager;
|
||||
import com.plotsquared.core.util.EconHandler;
|
||||
import com.plotsquared.core.util.InventoryUtil;
|
||||
import com.plotsquared.core.util.SchematicHandler;
|
||||
import com.plotsquared.core.util.SetupUtils;
|
||||
import com.plotsquared.core.util.WorldUtil;
|
||||
import com.plotsquared.core.util.logger.ILogger;
|
||||
import com.plotsquared.core.util.task.TaskManager;
|
||||
import com.plotsquared.core.util.uuid.UUIDHandlerImplementation;
|
||||
import com.plotsquared.core.util.WorldUtil;
|
||||
import com.plotsquared.core.queue.QueueProvider;
|
||||
import com.sk89q.worldedit.extension.platform.Actor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
@ -29,11 +29,11 @@ import com.plotsquared.core.command.WE_Anywhere;
|
||||
import com.plotsquared.core.configuration.Caption;
|
||||
import com.plotsquared.core.configuration.CaptionUtility;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.ConfigurationSection;
|
||||
import com.plotsquared.core.configuration.ConfigurationUtil;
|
||||
import com.plotsquared.core.configuration.MemorySection;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.Storage;
|
||||
import com.plotsquared.core.configuration.ConfigurationSection;
|
||||
import com.plotsquared.core.configuration.MemorySection;
|
||||
import com.plotsquared.core.configuration.file.YamlConfiguration;
|
||||
import com.plotsquared.core.configuration.serialization.ConfigurationSerialization;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
@ -130,7 +130,8 @@ import java.util.zip.ZipInputStream;
|
||||
/**
|
||||
* An implementation of the core, with a static getter for easy access.
|
||||
*/
|
||||
@SuppressWarnings({"unused", "WeakerAccess"}) public class PlotSquared {
|
||||
@SuppressWarnings({"unused", "WeakerAccess"})
|
||||
public class PlotSquared {
|
||||
private static final Set<Plot> EMPTY_SET = Collections.unmodifiableSet(Collections.emptySet());
|
||||
private static PlotSquared instance;
|
||||
// Implementation
|
||||
@ -360,7 +361,8 @@ import java.util.zip.ZipInputStream;
|
||||
}
|
||||
|
||||
PlotSquared.log(Captions.PREFIX + CaptionUtility
|
||||
.format(ConsolePlayer.getConsole(), Captions.ENABLED.getTranslated(), IMP.getPluginName()));
|
||||
.format(ConsolePlayer.getConsole(), Captions.ENABLED.getTranslated(),
|
||||
IMP.getPluginName()));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -518,8 +520,9 @@ import java.util.zip.ZipInputStream;
|
||||
Set<PlotCluster> clusters;
|
||||
if (clusters_tmp == null || (clusters = clusters_tmp.remove(plotArea.toString())) == null) {
|
||||
if (plotArea.getType() == PlotAreaType.PARTIAL) {
|
||||
clusters =
|
||||
this.clusters_tmp != null ? this.clusters_tmp.get(plotArea.getWorldName()) : null;
|
||||
clusters = this.clusters_tmp != null ?
|
||||
this.clusters_tmp.get(plotArea.getWorldName()) :
|
||||
null;
|
||||
if (clusters != null) {
|
||||
Iterator<PlotCluster> iterator = clusters.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
@ -542,8 +545,8 @@ import java.util.zip.ZipInputStream;
|
||||
return;
|
||||
}
|
||||
File file = new File(
|
||||
this.IMP.getDirectory() + File.separator + "persistent_regen_data_" + plotArea.getId() + "_"
|
||||
+ plotArea.getWorldName());
|
||||
this.IMP.getDirectory() + File.separator + "persistent_regen_data_" + plotArea.getId()
|
||||
+ "_" + plotArea.getWorldName());
|
||||
if (!file.exists()) {
|
||||
return;
|
||||
}
|
||||
@ -1301,7 +1304,8 @@ import java.util.zip.ZipInputStream;
|
||||
}
|
||||
if (type == PlotAreaType.AUGMENTED) {
|
||||
throw new IllegalArgumentException(
|
||||
"Invalid type for multi-area world. Expected `PARTIAL`, got `" + PlotAreaType.AUGMENTED + "`");
|
||||
"Invalid type for multi-area world. Expected `PARTIAL`, got `"
|
||||
+ PlotAreaType.AUGMENTED + "`");
|
||||
}
|
||||
for (String areaId : areasSection.getKeys(false)) {
|
||||
PlotSquared.log(Captions.PREFIX + " - " + areaId);
|
||||
@ -1636,8 +1640,9 @@ import java.util.zip.ZipInputStream;
|
||||
list.add(regions);
|
||||
list.add(chunks);
|
||||
list.add(HybridUtils.height);
|
||||
File file = new File(this.IMP.getDirectory() + File.separator + "persistent_regen_data_"
|
||||
+ HybridUtils.area.getId() + "_" + HybridUtils.area.getWorldName());
|
||||
File file = new File(
|
||||
this.IMP.getDirectory() + File.separator + "persistent_regen_data_" + HybridUtils.area
|
||||
.getId() + "_" + HybridUtils.area.getWorldName());
|
||||
if (file.exists() && !file.delete()) {
|
||||
PlotSquared.log(Captions.PREFIX
|
||||
+ "persistent_regen_data file already exists and could not be deleted.");
|
||||
@ -1712,9 +1717,9 @@ import java.util.zip.ZipInputStream;
|
||||
String lastVersionString = this.getConfig().getString("version");
|
||||
if (lastVersionString != null) {
|
||||
String[] split = lastVersionString.split("\\.");
|
||||
int[] lastVersion = new int[]{Integer.parseInt(split[0]), Integer.parseInt(split[1]),
|
||||
int[] lastVersion = new int[] {Integer.parseInt(split[0]), Integer.parseInt(split[1]),
|
||||
Integer.parseInt(split[2])};
|
||||
if (checkVersion(new int[]{3, 4, 0}, lastVersion)) {
|
||||
if (checkVersion(new int[] {3, 4, 0}, lastVersion)) {
|
||||
Settings.convertLegacy(configFile);
|
||||
if (getConfig().contains("worlds")) {
|
||||
ConfigurationSection worldSection =
|
||||
@ -1768,10 +1773,10 @@ import java.util.zip.ZipInputStream;
|
||||
this.worlds = YamlConfiguration.loadConfiguration(this.worldsFile);
|
||||
|
||||
if (this.worlds.contains("worlds")) {
|
||||
if (!this.worlds.contains("configuration_version") ||
|
||||
(!this.worlds.getString("configuration_version").equalsIgnoreCase(
|
||||
LegacyConverter.CONFIGURATION_VERSION) &&
|
||||
!this.worlds.getString("configuration_version").equalsIgnoreCase("v5"))) {
|
||||
if (!this.worlds.contains("configuration_version") || (
|
||||
!this.worlds.getString("configuration_version")
|
||||
.equalsIgnoreCase(LegacyConverter.CONFIGURATION_VERSION) && !this.worlds
|
||||
.getString("configuration_version").equalsIgnoreCase("v5"))) {
|
||||
// Conversion needed
|
||||
log(Captions.LEGACY_CONFIG_FOUND.getTranslated());
|
||||
try {
|
||||
@ -1860,7 +1865,8 @@ import java.util.zip.ZipInputStream;
|
||||
}
|
||||
|
||||
public String getConfigurationVersion() {
|
||||
return this.worlds.get("configuration_version", LegacyConverter.CONFIGURATION_VERSION).toString();
|
||||
return this.worlds.get("configuration_version", LegacyConverter.CONFIGURATION_VERSION)
|
||||
.toString();
|
||||
}
|
||||
|
||||
public void setConfigurationVersion(final String newVersion) throws IOException {
|
||||
|
@ -75,8 +75,7 @@ public class PlotVersion {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@Override public String toString() {
|
||||
if (hash == 0 && versionString == null) {
|
||||
return "PlotSquared-NoVer-SNAPSHOT";
|
||||
} else {
|
||||
|
@ -25,13 +25,13 @@
|
||||
*/
|
||||
package com.plotsquared.core.database;
|
||||
|
||||
import com.plotsquared.core.plot.flag.PlotFlag;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
import com.plotsquared.core.plot.PlotArea;
|
||||
import com.plotsquared.core.plot.PlotCluster;
|
||||
import com.plotsquared.core.plot.PlotId;
|
||||
import com.plotsquared.core.util.task.RunnableVal;
|
||||
import com.plotsquared.core.plot.comment.PlotComment;
|
||||
import com.plotsquared.core.plot.flag.PlotFlag;
|
||||
import com.plotsquared.core.util.task.RunnableVal;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.HashMap;
|
||||
@ -191,7 +191,8 @@ public class AbstractDBTest implements AbstractDB {
|
||||
@Override public void setComment(Plot plot, PlotComment comment) {
|
||||
}
|
||||
|
||||
@Override public void getComments(@NotNull Plot plot, String inbox,
|
||||
@Override
|
||||
public void getComments(@NotNull Plot plot, String inbox,
|
||||
RunnableVal<List<PlotComment>> whenDone) {
|
||||
}
|
||||
|
||||
|
@ -44,14 +44,14 @@ import com.plotsquared.core.events.PlotFlagRemoveEvent;
|
||||
import com.plotsquared.core.events.PlotMergeEvent;
|
||||
import com.plotsquared.core.events.PlotRateEvent;
|
||||
import com.plotsquared.core.events.PlotUnlinkEvent;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.flag.PlotFlag;
|
||||
import com.plotsquared.core.location.Direction;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
import com.plotsquared.core.plot.PlotArea;
|
||||
import com.plotsquared.core.plot.PlotId;
|
||||
import com.plotsquared.core.plot.Rating;
|
||||
import com.plotsquared.core.plot.flag.PlotFlag;
|
||||
import com.plotsquared.core.util.EventDispatcher;
|
||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||
|
||||
@ -110,7 +110,8 @@ public class EventDispatcherTest extends EventDispatcher {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public PlotUnlinkEvent callUnlink(PlotArea area, Plot plot, boolean createRoad,
|
||||
@Override
|
||||
public PlotUnlinkEvent callUnlink(PlotArea area, Plot plot, boolean createRoad,
|
||||
boolean createSign, PlotUnlinkEvent.REASON reason) {
|
||||
return null;
|
||||
}
|
||||
@ -123,7 +124,8 @@ public class EventDispatcherTest extends EventDispatcher {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public PlayerPlotDeniedEvent callDenied(PlotPlayer initiator, Plot plot, UUID player,
|
||||
@Override
|
||||
public PlayerPlotDeniedEvent callDenied(PlotPlayer initiator, Plot plot, UUID player,
|
||||
boolean added) {
|
||||
return null;
|
||||
}
|
||||
@ -134,7 +136,8 @@ public class EventDispatcherTest extends EventDispatcher {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public PlayerPlotHelperEvent callMember(PlotPlayer initiator, Plot plot, UUID player,
|
||||
@Override
|
||||
public PlayerPlotHelperEvent callMember(PlotPlayer initiator, Plot plot, UUID player,
|
||||
boolean added) {
|
||||
return null;
|
||||
}
|
||||
|
@ -27,8 +27,8 @@ package com.plotsquared.core.plot.util;
|
||||
|
||||
import com.plotsquared.core.database.AbstractDBTest;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
import com.plotsquared.core.util.uuid.UUIDHandlerImplementation;
|
||||
import com.plotsquared.core.util.task.RunnableVal;
|
||||
import com.plotsquared.core.util.uuid.UUIDHandlerImplementation;
|
||||
import com.plotsquared.core.util.uuid.UUIDWrapper;
|
||||
import org.junit.Before;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user