Skip to content

Commit

Permalink
no need to finalize passed value here
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Dec 24, 2023
1 parent 018d768 commit 46141ad
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
public interface TPSCache {

double getGlobalTPS();
double getTPS(final Location location);
double getTPS(final World world, final int chunkX, final int chunkZ);
double getTPS(Location location);
double getTPS(World world, int chunkX, int chunkZ);

static @NotNull TPSCache create(final long checkDelayMillis) {
static @NotNull TPSCache create(long checkDelayMillis) {
if (AnarchyExploitFixes.isServerFolia()) {
return new Folia(AnarchyExploitFixes.getInstance(), checkDelayMillis);
} else {
Expand Down Expand Up @@ -51,7 +51,7 @@ public double getGlobalTPS() {
}

@Override
public double getTPS(final World world, final int chunkX, final int chunkZ) {
public double getTPS(World world, int chunkX, int chunkZ) {
return getGlobalTPS();
}

Expand Down Expand Up @@ -85,12 +85,12 @@ public double getGlobalTPS() {
}

@Override
public double getTPS(final Location location) {
public double getTPS(Location location) {
return getTPS(location.getWorld(), location.getBlockX() >> 4, location.getBlockZ() >> 4);
}

@Override
public double getTPS(final World world, final int chunkX, final int chunkZ) {
public double getTPS(World world, int chunkX, int chunkZ) {
AtomicDouble atomic_tps = new AtomicDouble();
this.server.getRegionScheduler().execute(plugin, world, chunkX, chunkZ, () -> {
final ThreadedRegionizer.ThreadedRegion<TickRegions.TickRegionData, TickRegions.TickRegionSectionData>
Expand Down

0 comments on commit 46141ad

Please sign in to comment.