Compare commits

..

1 Commits

Author SHA1 Message Date
ebbbb6c670 fix: annotate ExpireManager with @Inject 2022-10-17 18:58:39 +02:00
10 changed files with 28 additions and 26 deletions

View File

@ -33,6 +33,7 @@ import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.generator.BlockPopulator;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.NotNull;
import java.util.Random;
@ -50,7 +51,7 @@ final class LegacyBlockStatePopulator extends BlockPopulator {
}
@Override
public void populate(@NonNull final World world, @NonNull final Random random, @NonNull final Chunk source) {
public void populate(@NotNull final World world, @NotNull final Random random, @NotNull final Chunk source) {
int chunkMinX = source.getX() << 4;
int chunkMinZ = source.getZ() << 4;
PlotArea area = Location.at(world.getName(), chunkMinX, 0, chunkMinZ).getPlotArea();

View File

@ -36,7 +36,8 @@ import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.world.biome.BiomeType;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Set;
@ -45,7 +46,10 @@ public class FaweRegionManager extends BukkitRegionManager {
private final FaweDelegateRegionManager delegate = new FaweDelegateRegionManager();
@Inject
public FaweRegionManager(WorldUtil worldUtil, GlobalBlockQueue blockQueue, ProgressSubscriberFactory subscriberFactory) {
public FaweRegionManager(
@NonNull WorldUtil worldUtil, @NonNull GlobalBlockQueue blockQueue, @NonNull
ProgressSubscriberFactory subscriberFactory
) {
super(worldUtil, blockQueue, subscriberFactory);
}
@ -72,9 +76,9 @@ public class FaweRegionManager extends BukkitRegionManager {
@Override
public boolean handleClear(
@NonNull Plot plot,
@NotNull Plot plot,
@Nullable Runnable whenDone,
@NonNull PlotManager manager,
@NotNull PlotManager manager,
final @Nullable PlotPlayer<?> player
) {
if (!Settings.FAWE_Components.CLEAR || !(manager instanceof HybridPlotManager)) {

View File

@ -29,7 +29,7 @@ import com.plotsquared.core.util.SchematicHandler;
import com.plotsquared.core.util.WorldUtil;
import com.plotsquared.core.util.task.RunnableVal;
import com.sk89q.jnbt.CompoundTag;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.NotNull;
import java.io.InputStream;
import java.net.URL;
@ -40,7 +40,7 @@ public class FaweSchematicHandler extends SchematicHandler {
private final FaweDelegateSchematicHandler delegate = new FaweDelegateSchematicHandler();
@Inject
public FaweSchematicHandler(WorldUtil worldUtil, ProgressSubscriberFactory subscriberFactory) {
public FaweSchematicHandler(@NotNull WorldUtil worldUtil, @NotNull ProgressSubscriberFactory subscriberFactory) {
super(worldUtil, subscriberFactory);
}
@ -75,7 +75,7 @@ public class FaweSchematicHandler extends SchematicHandler {
}
@Override
public Schematic getSchematic(@NonNull InputStream is) {
public Schematic getSchematic(@NotNull InputStream is) {
return delegate.getSchematic(is);
}

View File

@ -289,7 +289,7 @@ public interface PlotPlatform<P> extends LocaleHolder {
* Get the {@link ExpireManager} implementation for the platform
*
* @return Expire manager
* @since 6.10.2
* @since TODO
*/
default @NonNull ExpireManager expireManager() {
return injector().getInstance(ExpireManager.class);

View File

@ -21,15 +21,16 @@ package com.plotsquared.core.configuration.caption;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.event.ClickEvent;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.NotNull;
import java.util.EnumSet;
import java.util.Set;
final class ClickStripTransform implements ComponentTransform {
private final Set<ClickEvent.@NonNull Action> actionsToStrip;
private final Set<ClickEvent.@NotNull Action> actionsToStrip;
public ClickStripTransform(final Set<ClickEvent.@NonNull Action> actionsToStrip) {
public ClickStripTransform(final Set<ClickEvent.@NotNull Action> actionsToStrip) {
this.actionsToStrip = EnumSet.copyOf(actionsToStrip);
}

View File

@ -93,10 +93,10 @@ public class HybridPlotWorld extends ClassicPlotWorld {
@Inject
public HybridPlotWorld(
@Assisted("world") final String worldName,
@javax.annotation.Nullable @Assisted("id") final String id,
@Nullable @Assisted("id") final String id,
@Assisted final @NonNull IndependentPlotGenerator generator,
@javax.annotation.Nullable @Assisted("min") final PlotId min,
@javax.annotation.Nullable @Assisted("max") final PlotId max,
@Nullable @Assisted("min") final PlotId min,
@Nullable @Assisted("max") final PlotId max,
@WorldConfig final @NonNull YamlConfiguration worldConfiguration,
final @NonNull GlobalBlockQueue blockQueue
) {
@ -298,10 +298,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
int roadSchemHeight;
if (schematic1 != null) {
roadSchemHeight = Math.max(
schematic1.getClipboard().getDimensions().getY(),
schematic2.getClipboard().getDimensions().getY()
);
roadSchemHeight = schematic1.getClipboard().getDimensions().getY();
maxSchematicHeight = Math.max(roadSchemHeight, maxSchematicHeight);
if (maxSchematicHeight == worldGenHeight) {
SCHEM_Y = getMinGenHeight();
@ -489,7 +486,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
/**
* @deprecated This method should not be available for public API usage and will be made private.
*/
@Deprecated(forRemoval = true, since = "6.10.2")
@Deprecated(forRemoval = true, since = "TODO")
public void addOverlayBlock(short x, short y, short z, BaseBlock id, boolean rotate, int height) {
if (z < 0) {
z += this.SIZE;
@ -524,7 +521,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
/**
* @deprecated This method should not be available for public API usage and will be made private.
*/
@Deprecated(forRemoval = true, since = "6.10.2")
@Deprecated(forRemoval = true, since = "TODO")
public void addOverlayBiome(short x, short z, BiomeType id) {
if (z < 0) {
z += this.SIZE;

View File

@ -112,7 +112,7 @@ public final class PlotId {
* @return Plot ID copy
* @deprecated PlotId is immutable, copy is not required.
*/
@Deprecated(forRemoval = true, since = "6.10.2")
@Deprecated(forRemoval = true, since = "TODO")
public @NonNull PlotId copy() {
return this;
}

View File

@ -18,8 +18,7 @@
*/
package com.plotsquared.core.plot;
import org.checkerframework.checker.nullness.qual.Nullable;
import javax.annotation.Nullable;
import java.util.Objects;
public class PlotTitle {

View File

@ -65,7 +65,7 @@ public class ExpireManager {
/**
* @deprecated Use {@link PlotPlatform#expireManager()} instead
*/
@Deprecated(forRemoval = true, since = "6.10.2")
@Deprecated(forRemoval = true, since = "TODO")
public static ExpireManager IMP;
private final ConcurrentHashMap<UUID, Long> dates_cache;
private final ConcurrentHashMap<UUID, Long> account_age_cache;

View File

@ -19,7 +19,7 @@ plugins {
}
group = "com.plotsquared"
version = "6.10.4-SNAPSHOT"
version = "6.10.2-SNAPSHOT"
subprojects {
group = rootProject.group
@ -65,7 +65,7 @@ subprojects {
}
dependencies {
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.18"))
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.16"))
}
dependencies {