Compare commits

...

7 Commits

Author SHA1 Message Date
18346a0564 refactor: adjust specific Nullable annotations used
- Fixes #3860
 - Guice requires javax annotations be used for Inject annotated constructors
 - Guice does not require not-null annotations, this is assumed
 - Also to do with #3413
2022-11-12 11:45:47 +00:00
28bd993680 Update dependency com.intellectualsites.bom:bom-1.18.x to v1.18 (#3864)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-06 11:13:29 +01:00
8330f37d8a Back to snapshot for development 2022-11-02 09:35:57 +01:00
985fae65b6 ÂRelease 6.10.3 2022-11-02 09:34:33 +01:00
db2d590e8e fix: account for mismatched road-schematic heights (#3854) 2022-10-23 21:22:21 +02:00
c8d356783a Update dependency com.intellectualsites.bom:bom-1.18.x to v1.17 (#3853)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-20 10:23:56 +02:00
4947450ff0 Back to snapshot for development 2022-10-18 23:14:03 +02:00
7 changed files with 21 additions and 23 deletions

View File

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

View File

@ -36,8 +36,7 @@ import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.biome.BiomeType;
import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.NotNull; import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.Nullable;
import java.util.Set; import java.util.Set;
@ -46,10 +45,7 @@ public class FaweRegionManager extends BukkitRegionManager {
private final FaweDelegateRegionManager delegate = new FaweDelegateRegionManager(); private final FaweDelegateRegionManager delegate = new FaweDelegateRegionManager();
@Inject @Inject
public FaweRegionManager( public FaweRegionManager(WorldUtil worldUtil, GlobalBlockQueue blockQueue, ProgressSubscriberFactory subscriberFactory) {
@NonNull WorldUtil worldUtil, @NonNull GlobalBlockQueue blockQueue, @NonNull
ProgressSubscriberFactory subscriberFactory
) {
super(worldUtil, blockQueue, subscriberFactory); super(worldUtil, blockQueue, subscriberFactory);
} }
@ -76,9 +72,9 @@ public class FaweRegionManager extends BukkitRegionManager {
@Override @Override
public boolean handleClear( public boolean handleClear(
@NotNull Plot plot, @NonNull Plot plot,
@Nullable Runnable whenDone, @Nullable Runnable whenDone,
@NotNull PlotManager manager, @NonNull PlotManager manager,
final @Nullable PlotPlayer<?> player final @Nullable PlotPlayer<?> player
) { ) {
if (!Settings.FAWE_Components.CLEAR || !(manager instanceof HybridPlotManager)) { 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.WorldUtil;
import com.plotsquared.core.util.task.RunnableVal; import com.plotsquared.core.util.task.RunnableVal;
import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.CompoundTag;
import org.jetbrains.annotations.NotNull; import org.checkerframework.checker.nullness.qual.NonNull;
import java.io.InputStream; import java.io.InputStream;
import java.net.URL; import java.net.URL;
@ -40,7 +40,7 @@ public class FaweSchematicHandler extends SchematicHandler {
private final FaweDelegateSchematicHandler delegate = new FaweDelegateSchematicHandler(); private final FaweDelegateSchematicHandler delegate = new FaweDelegateSchematicHandler();
@Inject @Inject
public FaweSchematicHandler(@NotNull WorldUtil worldUtil, @NotNull ProgressSubscriberFactory subscriberFactory) { public FaweSchematicHandler(WorldUtil worldUtil, ProgressSubscriberFactory subscriberFactory) {
super(worldUtil, subscriberFactory); super(worldUtil, subscriberFactory);
} }
@ -75,7 +75,7 @@ public class FaweSchematicHandler extends SchematicHandler {
} }
@Override @Override
public Schematic getSchematic(@NotNull InputStream is) { public Schematic getSchematic(@NonNull InputStream is) {
return delegate.getSchematic(is); return delegate.getSchematic(is);
} }

View File

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

View File

@ -93,10 +93,10 @@ public class HybridPlotWorld extends ClassicPlotWorld {
@Inject @Inject
public HybridPlotWorld( public HybridPlotWorld(
@Assisted("world") final String worldName, @Assisted("world") final String worldName,
@Nullable @Assisted("id") final String id, @javax.annotation.Nullable @Assisted("id") final String id,
@Assisted final @NonNull IndependentPlotGenerator generator, @Assisted final @NonNull IndependentPlotGenerator generator,
@Nullable @Assisted("min") final PlotId min, @javax.annotation.Nullable @Assisted("min") final PlotId min,
@Nullable @Assisted("max") final PlotId max, @javax.annotation.Nullable @Assisted("max") final PlotId max,
@WorldConfig final @NonNull YamlConfiguration worldConfiguration, @WorldConfig final @NonNull YamlConfiguration worldConfiguration,
final @NonNull GlobalBlockQueue blockQueue final @NonNull GlobalBlockQueue blockQueue
) { ) {
@ -298,7 +298,10 @@ public class HybridPlotWorld extends ClassicPlotWorld {
int roadSchemHeight; int roadSchemHeight;
if (schematic1 != null) { if (schematic1 != null) {
roadSchemHeight = schematic1.getClipboard().getDimensions().getY(); roadSchemHeight = Math.max(
schematic1.getClipboard().getDimensions().getY(),
schematic2.getClipboard().getDimensions().getY()
);
maxSchematicHeight = Math.max(roadSchemHeight, maxSchematicHeight); maxSchematicHeight = Math.max(roadSchemHeight, maxSchematicHeight);
if (maxSchematicHeight == worldGenHeight) { if (maxSchematicHeight == worldGenHeight) {
SCHEM_Y = getMinGenHeight(); SCHEM_Y = getMinGenHeight();

View File

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

View File

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