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;
}
private record PlotCacheKey(Plot plot) {
private record PlotCacheKey(
Plot plot
) {
@Override
public boolean equals(final Object o) {

View File

@ -35,8 +35,15 @@ import java.util.Map;
* the component GUI
*/
@SerializableAs("preset")
public record ComponentPreset(ClassicPlotManagerComponent component, String pattern, double cost, String permission,
String displayName, List<String> description, ItemType icon) implements ConfigurationSerializable {
public record ComponentPreset(
ClassicPlotManagerComponent component,
String pattern,
double cost,
String permission,
String displayName,
List<String> description,
ItemType icon
) implements ConfigurationSerializable {
@SuppressWarnings("unchecked")
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.StringMan;
public record ChunkWrapper(String world, int x, int z) {
public record ChunkWrapper(
String world,
int x,
int z
) {
@Override
public int hashCode() {

View File

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

View File

@ -20,6 +20,13 @@ package com.plotsquared.core.plot.comment;
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();
}
public record Timed<T>(int interval, T value) {
public record Timed<T>(
int interval,
T value
) {
@Override
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.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

View File

@ -23,7 +23,10 @@ import com.plotsquared.core.configuration.ConfigurationNode;
/**
* 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

View File

@ -18,6 +18,9 @@
*/
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
*/
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
*/
public record UUIDMapping(@NonNull UUID uuid, @NonNull String username) {
public record UUIDMapping(
@NonNull UUID uuid,
@NonNull String username
) {
@Override
public boolean equals(final Object o) {