Checkstyle

This commit is contained in:
Alexander Brandes 2023-03-04 23:33:44 +01:00
parent 0484915233
commit e06bf2cd6b
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
12 changed files with 60 additions and 13 deletions

View File

@ -136,7 +136,9 @@ public class SimpleBackupManager implements BackupManager {
return this.backupLimit; return this.backupLimit;
} }
private record PlotCacheKey(Plot plot) { private record PlotCacheKey(
Plot plot
) {
@Override @Override
public boolean equals(final Object o) { public boolean equals(final Object o) {

View File

@ -35,8 +35,15 @@ import java.util.Map;
* the component GUI * the component GUI
*/ */
@SerializableAs("preset") @SerializableAs("preset")
public record ComponentPreset(ClassicPlotManagerComponent component, String pattern, double cost, String permission, public record ComponentPreset(
String displayName, List<String> description, ItemType icon) implements ConfigurationSerializable { ClassicPlotManagerComponent component,
String pattern,
double cost,
String permission,
String displayName,
List<String> description,
ItemType icon
) implements ConfigurationSerializable {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static ComponentPreset deserialize(final @NonNull Map<String, Object> map) { public static ComponentPreset deserialize(final @NonNull Map<String, Object> map) {

View File

@ -3414,7 +3414,10 @@ public class SQLManager implements AbstractDB {
} }
} }
private record LegacySettings(int id, PlotSettings settings) { private record LegacySettings(
int id,
PlotSettings settings
) {
} }

View File

@ -21,7 +21,11 @@ package com.plotsquared.core.location;
import com.plotsquared.core.util.MathMan; import com.plotsquared.core.util.MathMan;
import com.plotsquared.core.util.StringMan; import com.plotsquared.core.util.StringMan;
public record ChunkWrapper(String world, int x, int z) { public record ChunkWrapper(
String world,
int x,
int z
) {
@Override @Override
public int hashCode() { public int hashCode() {

View File

@ -215,7 +215,11 @@ public final class BlockBucket implements ConfigurationSerializable {
return result; return result;
} }
private record Range(int min, int max, boolean automatic) { private record Range(
int min,
int max,
boolean automatic
) {
public int getWeight() { public int getWeight() {
return max - min; return max - min;

View File

@ -20,6 +20,13 @@ package com.plotsquared.core.plot.comment;
import com.plotsquared.core.plot.PlotId; import com.plotsquared.core.plot.PlotId;
public record PlotComment(String world, PlotId id, String comment, String senderName, String inbox, long timestamp) { public record PlotComment(
String world,
PlotId id,
String comment,
String senderName,
String inbox,
long timestamp
) {
} }

View File

@ -76,7 +76,10 @@ public abstract class TimedFlag<T, F extends PlotFlag<TimedFlag.Timed<T>, F>>
return getValue().toString(); return getValue().toString();
} }
public record Timed<T>(int interval, T value) { public record Timed<T>(
int interval,
T value
) {
@Override @Override
public String toString() { public String toString() {

View File

@ -24,7 +24,13 @@ import com.plotsquared.core.plot.PlotId;
import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable; import org.checkerframework.checker.nullness.qual.Nullable;
public record AutoQuery(PlotPlayer<?> player, PlotId startId, int sizeX, int sizeZ, PlotArea plotArea) { public record AutoQuery(
PlotPlayer<?> player,
PlotId startId,
int sizeX,
int sizeZ,
PlotArea plotArea
) {
/** /**
* Crate a new auto query * Crate a new auto query

View File

@ -23,7 +23,10 @@ import com.plotsquared.core.configuration.ConfigurationNode;
/** /**
* This class wraps an array of {@link ConfigurationNode}s. * This class wraps an array of {@link ConfigurationNode}s.
*/ */
public record SettingsNodesWrapper(ConfigurationNode[] settingsNodes, SetupStep afterwards) { public record SettingsNodesWrapper(
ConfigurationNode[] settingsNodes,
SetupStep afterwards
) {
/** /**
* Returns the first step of this wrapper or the step or the * Returns the first step of this wrapper or the step or the

View File

@ -18,6 +18,9 @@
*/ */
package com.plotsquared.core.util; package com.plotsquared.core.util;
public record FileBytes(String path, byte[] data) { public record FileBytes(
String path,
byte[] data
) {
} }

View File

@ -300,7 +300,9 @@ public final class PlaceholderRegistry {
/** /**
* Event called when a new {@link Placeholder} has been added * Event called when a new {@link Placeholder} has been added
*/ */
public record PlaceholderAddedEvent(Placeholder placeholder) { public record PlaceholderAddedEvent(
Placeholder placeholder
) {
} }

View File

@ -25,7 +25,10 @@ import java.util.UUID;
/** /**
* A pair consisting of a UUID and a username * A pair consisting of a UUID and a username
*/ */
public record UUIDMapping(@NonNull UUID uuid, @NonNull String username) { public record UUIDMapping(
@NonNull UUID uuid,
@NonNull String username
) {
@Override @Override
public boolean equals(final Object o) { public boolean equals(final Object o) {