Skip to content

Commit 384b48a

Browse files
committed
chore: format code
1 parent adb1406 commit 384b48a

36 files changed

+115
-99
lines changed

orebfuscator-core/src/main/java/dev/imprex/orebfuscator/PermissionRequirements.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
@NullMarked
88
public record PermissionRequirements(OptionalInt operatorLevel, Optional<String> permission) {
99

10-
public static final PermissionRequirements BYPASS = new PermissionRequirements(OptionalInt.empty(), Optional.of("orebfuscator.bypass"));
11-
public static final PermissionRequirements ADMIN = new PermissionRequirements(OptionalInt.of(4), Optional.of("orebfuscator.admin"));
12-
10+
public static final PermissionRequirements BYPASS = new PermissionRequirements(OptionalInt.empty(),
11+
Optional.of("orebfuscator.bypass"));
12+
public static final PermissionRequirements ADMIN = new PermissionRequirements(OptionalInt.of(4),
13+
Optional.of("orebfuscator.admin"));
14+
1315
public PermissionRequirements {
1416
if (operatorLevel.isEmpty() && permission.isEmpty()) {
1517
throw new IllegalArgumentException("Either an operator level, permission or both have to defined");

orebfuscator-core/src/main/java/dev/imprex/orebfuscator/UpdateSystem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ private static boolean isDevVersion(String version) {
3939
private static final Duration CACHE_DURATION = Duration.ofMinutes(10L);
4040

4141
private final String loader;
42-
42+
4343
private final OrebfuscatorCore orebfuscator;
4444
private final GeneralConfig generalConfig;
4545

@@ -49,7 +49,7 @@ private static boolean isDevVersion(String version) {
4949

5050
public UpdateSystem(OrebfuscatorCore orebfuscator, String loader) {
5151
super(orebfuscator);
52-
52+
5353
this.loader = loader;
5454

5555
this.orebfuscator = orebfuscator;

orebfuscator-core/src/main/java/dev/imprex/orebfuscator/cache/AsyncChunkSerializer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
public class AsyncChunkSerializer implements Runnable {
3131

3232
private final CacheStatistics statistics;
33-
33+
3434
private final Lock lock = new ReentrantLock(true);
3535
private final Condition notFull = lock.newCondition();
3636
private final Condition notEmpty = lock.newCondition();
@@ -141,7 +141,7 @@ public void close() {
141141
this.lock.unlock();
142142
}
143143
}
144-
144+
145145
private abstract class TimedTask implements Runnable {
146146

147147
private final RollingTimer.Instance waitTimer = statistics.diskCacheWaitTime.start();
@@ -150,7 +150,7 @@ private abstract class TimedTask implements Runnable {
150150
public TimedTask(RollingTimer runTimer) {
151151
this.runTimer = runTimer;
152152
}
153-
153+
154154
@Override
155155
public final void run() {
156156
waitTimer.stop();
@@ -162,7 +162,7 @@ public final void run() {
162162
timer.stop();
163163
}
164164
}
165-
165+
166166
protected abstract void execute();
167167
}
168168

orebfuscator-core/src/main/java/dev/imprex/orebfuscator/cache/CacheResponse.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ public sealed interface CacheResponse permits CacheResponse.Success, CacheRespon
99
public static CacheResponse success(ChunkCacheEntry entry) {
1010
return new Success(entry);
1111
}
12-
12+
1313
record Success(ChunkCacheEntry entry) implements CacheResponse {
14+
1415
public Success {
1516
Objects.requireNonNull(entry, "entry");
1617
}

orebfuscator-core/src/main/java/dev/imprex/orebfuscator/cache/ChunkSerializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public ChunkCacheEntry read(ChunkCacheKey key) throws IOException {
3232

3333
byte[] compressedData = new byte[dataInputStream.readInt()];
3434
dataInputStream.readFully(compressedData);
35-
35+
3636
statistics.onDiskCacheRead(9 + compressedData.length);
3737

3838
return new ChunkCacheEntry(key, compressedData);

orebfuscator-core/src/main/java/dev/imprex/orebfuscator/cache/ObfuscationCache.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ private CompletionStage<CacheResponse> probeCaches(CacheRequest request) {
8888

8989
if (this.serializer != null) {
9090
future = future.thenComposeAsync(response ->
91-
// only access disk cache if we couldn't find an entry in memory cache
92-
response == CacheResponse.Failure.NOT_FOUND
93-
? this.probeDisk(request)
94-
: CompletableFuture.completedStage(response)
91+
// only access disk cache if we couldn't find an entry in memory cache
92+
response == CacheResponse.Failure.NOT_FOUND
93+
? this.probeDisk(request)
94+
: CompletableFuture.completedStage(response)
9595
, this.executor);
9696
}
9797

orebfuscator-core/src/main/java/dev/imprex/orebfuscator/config/components/ConfigBlockValue.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public record ConfigBlockValue(String value, Set<BlockProperties> blocks) implem
1818

1919
private static final JsonElement INVALID = new JsonPrimitive("invalid");
2020
private static final JsonElement VALID = new JsonPrimitive("valid");
21-
21+
2222
public static JsonObject toJson(Collection<? extends ConfigBlockValue> values) {
2323
JsonObject object = new JsonObject();
2424

orebfuscator-core/src/main/java/dev/imprex/orebfuscator/interop/OrebfuscatorCore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
public interface OrebfuscatorCore extends ServerAccessor {
1414

1515
ThreadGroup THREAD_GROUP = new ThreadGroup("orebfuscator");
16-
16+
1717
String name();
1818

1919
OrebfuscatorExecutor executor();

orebfuscator-core/src/main/java/dev/imprex/orebfuscator/interop/PlayerAccessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public interface PlayerAccessor {
2020
boolean isAlive();
2121

2222
boolean isSpectator();
23-
23+
2424
double lavaFogDistance();
2525

2626
boolean hasPermission(PermissionRequirements permission);

orebfuscator-core/src/main/java/dev/imprex/orebfuscator/interop/WorldAccessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public interface WorldAccessor {
3030
CompletableFuture<ChunkAccessor[]> getNeighboringChunks(ObfuscationRequest request);
3131

3232
ChunkAccessor getChunk(int chunkX, int chunkZ);
33-
33+
3434
@Deprecated
3535
int getBlockState(int x, int y, int z);
3636

0 commit comments

Comments
 (0)