From f2ee2248e0d8b8ff68382872baf9e2f62baf122c Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sat, 24 Jul 2021 14:52:08 +0100 Subject: [PATCH] Consistenty use javax annotations. (#1197) - Unfortunately jetbrains annotations seem to be exposed transitively via core somewhere, but with the correct IDE settings, annotations can be defaulted to javax - Cleaning up of import order in #1195 - Must be merged before #1195 Co-authored-by: NotMyFault --- buildSrc/src/main/kotlin/PlatformConfig.kt | 1 - worldedit-bukkit/build.gradle.kts | 1 - .../bukkit/adapter/DelegateLock.java | 4 +- .../bukkit/adapter/NMSRelighterFactory.java | 4 +- .../bukkit/preloader/PluginPreloader.java | 26 ++++++------- .../FaweDelegateRegionManager.java | 8 ++-- .../FaweDelegateSchematicHandler.java | 4 +- .../plotsquared/FaweQueueCoordinator.java | 22 +++++------ .../bukkit/util/BukkitTaskManager.java | 14 +++---- .../bukkit/util/MinecraftVersion.java | 6 +-- .../sk89q/worldedit/bukkit/BukkitAdapter.java | 8 ++-- .../bukkit/BukkitBlockCommandSender.java | 2 +- .../bukkit/BukkitServerInterface.java | 4 +- .../sk89q/wepif/TestOfflinePermissible.java | 38 +++++++++---------- .../com/sk89q/worldedit/cli/CLIPlatform.java | 4 +- .../cli/schematic/ClipboardWorld.java | 2 +- .../fastasyncworldedit/core/FaweCache.java | 6 +-- .../core/command/CFICommands.java | 8 ++-- .../core/configuration/Caption.java | 2 +- .../core/database/RollbackDatabase.java | 4 +- .../core/entity/MapMetadatable.java | 6 +-- .../core/entity/Metadatable.java | 8 ++-- .../extension/factory/parser/RichParser.java | 8 ++-- .../parser/mask/AdjacentMaskParser.java | 4 +- .../factory/parser/mask/AngleMaskParser.java | 4 +- .../parser/mask/ExtremaMaskParser.java | 4 +- .../parser/mask/ROCAngleMaskParser.java | 4 +- .../factory/parser/mask/RadiusMaskParser.java | 4 +- .../parser/mask/RichOffsetMaskParser.java | 4 +- .../parser/mask/SimplexMaskParser.java | 4 +- .../parser/pattern/BiomePatternParser.java | 4 +- .../parser/pattern/BufferedPatternParser.java | 4 +- .../parser/pattern/Linear2DPatternParser.java | 4 +- .../parser/pattern/Linear3DPatternParser.java | 4 +- .../parser/pattern/NoisePatternParser.java | 4 +- .../core/extent/clipboard/EmptyClipboard.java | 38 +++++++++---------- .../extent/clipboard/LinearClipboard.java | 4 +- .../io/schematic/MinecraftStructure.java | 4 +- .../extent/filter/block/CharFilterBlock.java | 4 +- .../extent/processor/EmptyBatchProcessor.java | 14 +++---- .../extent/processor/HeightmapProcessor.java | 2 +- .../extent/processor/MultiBatchProcessor.java | 2 +- .../core/extent/processor/NullProcessor.java | 12 +++--- .../processor/lighting/RelightProcessor.java | 2 +- .../processor/lighting/RelighterFactory.java | 4 +- .../internal/io/LittleEndianOutputStream.java | 4 +- .../core/math/BlockVectorSet.java | 6 +-- .../core/math/LocalBlockVectorSet.java | 10 ++--- .../core/queue/IBatchProcessor.java | 2 +- .../core/queue/IChunkGet.java | 2 +- .../implementation/blocks/NullChunkGet.java | 18 ++++----- .../queue/implementation/chunk/NullChunk.java | 32 ++++++++-------- .../core/regions/FuzzyRegion.java | 4 +- .../core/regions/IDelegateRegion.java | 4 +- .../core/registry/state/PropertyKey.java | 4 +- .../core/registry/state/PropertyKeySet.java | 18 ++++----- .../core/util/EditSessionBuilder.java | 18 ++++----- .../core/util/ExtentTraverser.java | 6 +-- .../core/util/MainUtil.java | 9 ++--- .../core/util/Permission.java | 4 +- .../core/util/ReflectionUtils.java | 4 +- .../core/util/TaskManager.java | 30 +++++++-------- .../core/util/collection/AdaptedMap.java | 4 +- .../util/collection/AdaptedSetCollection.java | 18 ++++----- .../core/util/collection/IAdaptedMap.java | 12 +++--- .../core/util/collection/MemBlockSet.java | 4 +- .../core/util/collection/YieldIterable.java | 2 +- .../core/world/block/BlanketBaseBlock.java | 4 +- .../java/com/sk89q/worldedit/EditSession.java | 8 ++-- .../worldedit/command/HistorySubCommands.java | 4 +- .../command/tool/FloatingTreeRemover.java | 2 +- .../worldedit/command/tool/FloodFillTool.java | 2 +- .../worldedit/command/tool/QueryTool.java | 2 +- .../command/tool/RecursivePickaxe.java | 2 +- .../extension/platform/Platform.java | 4 +- .../platform/PlatformCommandManager.java | 4 +- .../extent/clipboard/BlockArrayClipboard.java | 4 +- .../worldedit/extent/clipboard/Clipboard.java | 4 +- .../transform/BlockTransformExtent.java | 4 +- .../function/mask/BlockTypeMask.java | 10 ++--- .../sk89q/worldedit/function/mask/Mask.java | 2 +- .../history/changeset/ChangeSet.java | 2 +- .../sk89q/worldedit/regions/CuboidRegion.java | 4 +- .../worldedit/regions/RegionSelector.java | 2 +- .../registry/state/AbstractProperty.java | 2 +- .../worldedit/world/block/BlockState.java | 4 +- .../world/registry/BlockMaterial.java | 2 +- 87 files changed, 304 insertions(+), 307 deletions(-) diff --git a/buildSrc/src/main/kotlin/PlatformConfig.kt b/buildSrc/src/main/kotlin/PlatformConfig.kt index 6ecbf6657..b553635fd 100644 --- a/buildSrc/src/main/kotlin/PlatformConfig.kt +++ b/buildSrc/src/main/kotlin/PlatformConfig.kt @@ -55,7 +55,6 @@ fun Project.applyPlatformAndCoreConfiguration() { } dependencies { - "compileOnly"("org.jetbrains:annotations:20.1.0") "testImplementation"("org.junit.jupiter:junit-jupiter-api:${Versions.JUNIT}") "testImplementation"("org.junit.jupiter:junit-jupiter-params:${Versions.JUNIT}") "testImplementation"("org.mockito:mockito-core:${Versions.MOCKITO}") diff --git a/worldedit-bukkit/build.gradle.kts b/worldedit-bukkit/build.gradle.kts index a5432ea87..143ca9058 100644 --- a/worldedit-bukkit/build.gradle.kts +++ b/worldedit-bukkit/build.gradle.kts @@ -67,7 +67,6 @@ dependencies { }) implementation("org.apache.logging.log4j:log4j-api") compileOnly("org.spigotmc:spigot:1.17-R0.1-SNAPSHOT") - compileOnly("org.jetbrains:annotations:21.0.0") implementation("io.papermc:paperlib:1.0.6") compileOnly("com.sk89q:dummypermscompat:1.10") { exclude("com.github.MilkBowl", "VaultAPI") diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/DelegateLock.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/DelegateLock.java index d08165125..239d451ab 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/DelegateLock.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/DelegateLock.java @@ -5,14 +5,14 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; public class DelegateLock extends ReentrantLockWithGetOwner { private final ReentrantLock parent; private volatile boolean modified; private final AtomicInteger count; - public DelegateLock(@NotNull ReentrantLock parent) { + public DelegateLock(@Nonnull ReentrantLock parent) { this.parent = parent; this.count = null; } diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/NMSRelighterFactory.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/NMSRelighterFactory.java index 5a81211f5..9f0c34c67 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/NMSRelighterFactory.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/NMSRelighterFactory.java @@ -8,11 +8,11 @@ import com.fastasyncworldedit.core.extent.processor.lighting.RelighterFactory; import com.fastasyncworldedit.core.configuration.Settings; import com.fastasyncworldedit.core.extent.processor.lighting.RelightMode; import com.sk89q.worldedit.world.World; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; public class NMSRelighterFactory implements RelighterFactory { @Override - public @NotNull Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { + public @Nonnull Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue) { return new NMSRelighter(queue, relightMode != null ? relightMode : RelightMode.valueOf(Settings.IMP.LIGHTING.MODE)); } diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/preloader/PluginPreloader.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/preloader/PluginPreloader.java index 2d3a497dd..cb54bb3d4 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/preloader/PluginPreloader.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/preloader/PluginPreloader.java @@ -13,8 +13,8 @@ import org.bukkit.generator.ChunkGenerator; import org.bukkit.plugin.PluginBase; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.PluginLoader; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.io.File; import java.io.InputStream; @@ -95,26 +95,26 @@ public class PluginPreloader extends PluginBase { } @Override - @NotNull + @Nonnull public File getDataFolder() { return null; } @Override - @NotNull + @Nonnull public PluginDescriptionFile getDescription() { return null; } @Override - @NotNull + @Nonnull public FileConfiguration getConfig() { return null; } @Override @Nullable - public InputStream getResource(@NotNull String filename) { + public InputStream getResource(@Nonnull String filename) { return null; } @@ -129,7 +129,7 @@ public class PluginPreloader extends PluginBase { } @Override - public void saveResource(@NotNull String resourcePath, boolean replace) { + public void saveResource(@Nonnull String resourcePath, boolean replace) { } @@ -139,13 +139,13 @@ public class PluginPreloader extends PluginBase { } @Override - @NotNull + @Nonnull public PluginLoader getPluginLoader() { return null; } @Override - @NotNull + @Nonnull public Server getServer() { return null; } @@ -182,24 +182,24 @@ public class PluginPreloader extends PluginBase { @Override @Nullable - public ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, @Nullable String id) { + public ChunkGenerator getDefaultWorldGenerator(@Nonnull String worldName, @Nullable String id) { return null; } @Override - @NotNull + @Nonnull public Logger getLogger() { return null; } @Override - public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) { + public boolean onCommand(@Nonnull CommandSender sender, @Nonnull Command command, @Nonnull String label, String[] args) { return false; } @Override @Nullable - public List onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) { + public List onTabComplete(@Nonnull CommandSender sender, @Nonnull Command command, @Nonnull String alias, String[] args) { return null; } } diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweDelegateRegionManager.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweDelegateRegionManager.java index 63750e071..3c24472e8 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweDelegateRegionManager.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweDelegateRegionManager.java @@ -33,8 +33,8 @@ import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockTypes; import org.checkerframework.checker.nullness.qual.NonNull; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.io.File; import java.io.FileInputStream; @@ -84,9 +84,9 @@ public class FaweDelegateRegionManager { return hpw.getType() != PlotAreaType.AUGMENTED || hpw.getTerrain() == PlotAreaTerrainType.NONE; } - public boolean handleClear(@NotNull Plot plot, + public boolean handleClear(@Nonnull Plot plot, @Nullable Runnable whenDone, - @NotNull PlotManager manager) { + @Nonnull PlotManager manager) { TaskManager.IMP.async(() -> { synchronized (FaweDelegateRegionManager.class) { final HybridPlotWorld hybridPlotWorld = ((HybridPlotManager) manager).getHybridPlotWorld(); diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweDelegateSchematicHandler.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweDelegateSchematicHandler.java index 91ed24a7e..465435daa 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweDelegateSchematicHandler.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweDelegateSchematicHandler.java @@ -33,7 +33,7 @@ import com.sk89q.worldedit.regions.CuboidRegion; import net.jpountz.lz4.LZ4BlockInputStream; import org.anarres.parallelgzip.ParallelGZIPOutputStream; import org.apache.logging.log4j.Logger; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; @@ -190,7 +190,7 @@ public class FaweDelegateSchematicHandler { }, whenDone); } - public Schematic getSchematic(@NotNull InputStream is) { + public Schematic getSchematic(@Nonnull InputStream is) { try { FastSchematicReader schematicReader = new FastSchematicReader( new NBTInputStream(new BufferedInputStream(new GZIPInputStream(new BufferedInputStream(is))))); diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweQueueCoordinator.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweQueueCoordinator.java index 7946af39f..5b941dec8 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweQueueCoordinator.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/FaweQueueCoordinator.java @@ -18,8 +18,8 @@ import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.List; import java.util.Set; @@ -76,7 +76,7 @@ public class FaweQueueCoordinator extends QueueCoordinator { } @Override - public boolean setBiome(int x, int y, int z, @NotNull BiomeType biome) { + public boolean setBiome(int x, int y, int z, @Nonnull BiomeType biome) { return false; } @@ -86,23 +86,23 @@ public class FaweQueueCoordinator extends QueueCoordinator { } @Override - public boolean setEntity(@NotNull Entity entity) { + public boolean setEntity(@Nonnull Entity entity) { return false; } - @NotNull + @Nonnull @Override public List getReadChunks() { return null; } @Override - public void addReadChunks(@NotNull Set readChunks) { + public void addReadChunks(@Nonnull Set readChunks) { } @Override - public void addReadChunk(@NotNull BlockVector2 chunk) { + public void addReadChunk(@Nonnull BlockVector2 chunk) { } @@ -123,7 +123,7 @@ public class FaweQueueCoordinator extends QueueCoordinator { } @Override - public void setRegenRegion(@NotNull CuboidRegion regenRegion) { + public void setRegenRegion(@Nonnull CuboidRegion regenRegion) { } @@ -161,16 +161,16 @@ public class FaweQueueCoordinator extends QueueCoordinator { } @Override - public void setChunkConsumer(@NotNull Consumer consumer) { + public void setChunkConsumer(@Nonnull Consumer consumer) { } @Override - public void addProgressSubscriber(@NotNull ProgressSubscriber progressSubscriber) { + public void addProgressSubscriber(@Nonnull ProgressSubscriber progressSubscriber) { } - @NotNull + @Nonnull @Override public LightingMode getLightingMode() { return null; diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/BukkitTaskManager.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/BukkitTaskManager.java index 95c4213ec..444d6d38f 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/BukkitTaskManager.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/BukkitTaskManager.java @@ -4,7 +4,7 @@ import com.fastasyncworldedit.core.util.TaskManager; import org.apache.commons.lang.mutable.MutableInt; import org.bukkit.Bukkit; import org.bukkit.plugin.Plugin; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; public class BukkitTaskManager extends TaskManager { @@ -15,34 +15,34 @@ public class BukkitTaskManager extends TaskManager { } @Override - public int repeat(@NotNull final Runnable runnable, final int interval) { + public int repeat(@Nonnull final Runnable runnable, final int interval) { return this.plugin.getServer().getScheduler().scheduleSyncRepeatingTask(this.plugin, runnable, interval, interval); } @Override - public int repeatAsync(@NotNull final Runnable runnable, final int interval) { + public int repeatAsync(@Nonnull final Runnable runnable, final int interval) { return this.plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(this.plugin, runnable, interval, interval); } public MutableInt index = new MutableInt(0); @Override - public void async(@NotNull final Runnable runnable) { + public void async(@Nonnull final Runnable runnable) { this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, runnable).getTaskId(); } @Override - public void task(@NotNull final Runnable runnable) { + public void task(@Nonnull final Runnable runnable) { this.plugin.getServer().getScheduler().runTask(this.plugin, runnable).getTaskId(); } @Override - public void later(@NotNull final Runnable runnable, final int delay) { + public void later(@Nonnull final Runnable runnable, final int delay) { this.plugin.getServer().getScheduler().runTaskLater(this.plugin, runnable, delay).getTaskId(); } @Override - public void laterAsync(@NotNull final Runnable runnable, final int delay) { + public void laterAsync(@Nonnull final Runnable runnable, final int delay) { this.plugin.getServer().getScheduler().runTaskLaterAsynchronously(this.plugin, runnable, delay); } diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/MinecraftVersion.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/MinecraftVersion.java index a382a2147..129ac6bdd 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/MinecraftVersion.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/util/MinecraftVersion.java @@ -2,7 +2,7 @@ package com.fastasyncworldedit.bukkit.util; import com.google.common.collect.ComparisonChain; import org.bukkit.Bukkit; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; /** * Utility class for retrieving and comparing minecraft server versions. @@ -107,7 +107,7 @@ public class MinecraftVersion implements Comparable { } @Override - public int compareTo(@NotNull MinecraftVersion other) { + public int compareTo(@Nonnull MinecraftVersion other) { if (other.equals(this)) { return 0; } @@ -140,4 +140,4 @@ public class MinecraftVersion implements Comparable { return fullPackagePath.substring(fullPackagePath.lastIndexOf('.') + 1); } -} \ No newline at end of file +} diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java index 2c6f3e063..b051a48cc 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java @@ -49,8 +49,8 @@ import org.bukkit.block.data.BlockData; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.EnumMap; import java.util.HashMap; @@ -430,7 +430,7 @@ public enum BukkitAdapter { * @param blockData The Bukkit BlockData * @return The WorldEdit BlockState */ - public static BlockState adapt(@NotNull BlockData blockData) { + public static BlockState adapt(@Nonnull BlockData blockData) { //FAWE start - logic moved to IBukkitAdapter return getAdapter().adapt(blockData); //FAWE end @@ -444,7 +444,7 @@ public enum BukkitAdapter { * @param block The WorldEdit BlockStateHolder * @return The Bukkit BlockData */ - public static BlockData adapt(@NotNull BlockStateHolder block) { + public static BlockData adapt(@Nonnull BlockStateHolder block) { //FAWE start - logic moved to IBukkitAdapter return getAdapter().adapt(block); //FAWE end diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBlockCommandSender.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBlockCommandSender.java index 12b9fe9d6..378930da8 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBlockCommandSender.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBlockCommandSender.java @@ -36,7 +36,7 @@ import org.bukkit.Material; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.command.BlockCommandSender; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.nio.charset.StandardCharsets; import java.util.Locale; diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java index b16b75330..48d6223d9 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java @@ -45,7 +45,7 @@ import org.bukkit.Server; import org.bukkit.World; import org.bukkit.entity.EntityType; import org.enginehub.piston.CommandManager; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.Collection; @@ -264,7 +264,7 @@ public class BukkitServerInterface extends AbstractPlatform implements MultiUser //FAWE start @Override - public @NotNull RelighterFactory getRelighterFactory() { + public @Nonnull RelighterFactory getRelighterFactory() { if (this.relighterFactory == null) { this.relighterFactory = this.plugin.getBukkitImplAdapter().getRelighterFactory(); LOGGER.info("Using " + this.relighterFactory.getClass().getCanonicalName() + " as relighter factory."); diff --git a/worldedit-bukkit/src/test/java/com/sk89q/wepif/TestOfflinePermissible.java b/worldedit-bukkit/src/test/java/com/sk89q/wepif/TestOfflinePermissible.java index 3b8349dea..3c338f758 100644 --- a/worldedit-bukkit/src/test/java/com/sk89q/wepif/TestOfflinePermissible.java +++ b/worldedit-bukkit/src/test/java/com/sk89q/wepif/TestOfflinePermissible.java @@ -37,7 +37,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.UUID; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; public class TestOfflinePermissible implements OfflinePlayer, Permissible { private boolean op; @@ -201,106 +201,106 @@ public class TestOfflinePermissible implements OfflinePlayer, Permissible { } @Override - public void incrementStatistic(@NotNull Statistic statistic) throws IllegalArgumentException { + public void incrementStatistic(@Nonnull Statistic statistic) throws IllegalArgumentException { } @Override - public void decrementStatistic(@NotNull Statistic statistic) throws IllegalArgumentException { + public void decrementStatistic(@Nonnull Statistic statistic) throws IllegalArgumentException { } @Override - public void incrementStatistic(@NotNull Statistic statistic, int amount) + public void incrementStatistic(@Nonnull Statistic statistic, int amount) throws IllegalArgumentException { } @Override - public void decrementStatistic(@NotNull Statistic statistic, int amount) + public void decrementStatistic(@Nonnull Statistic statistic, int amount) throws IllegalArgumentException { } @Override - public void setStatistic(@NotNull Statistic statistic, int newValue) + public void setStatistic(@Nonnull Statistic statistic, int newValue) throws IllegalArgumentException { } @Override - public int getStatistic(@NotNull Statistic statistic) throws IllegalArgumentException { + public int getStatistic(@Nonnull Statistic statistic) throws IllegalArgumentException { return 0; } @Override - public void incrementStatistic(@NotNull Statistic statistic, @NotNull Material material) + public void incrementStatistic(@Nonnull Statistic statistic, @Nonnull Material material) throws IllegalArgumentException { } @Override - public void decrementStatistic(@NotNull Statistic statistic, @NotNull Material material) + public void decrementStatistic(@Nonnull Statistic statistic, @Nonnull Material material) throws IllegalArgumentException { } @Override - public int getStatistic(@NotNull Statistic statistic, @NotNull Material material) + public int getStatistic(@Nonnull Statistic statistic, @Nonnull Material material) throws IllegalArgumentException { return 0; } @Override - public void incrementStatistic(@NotNull Statistic statistic, @NotNull Material material, + public void incrementStatistic(@Nonnull Statistic statistic, @Nonnull Material material, int amount) throws IllegalArgumentException { } @Override - public void decrementStatistic(@NotNull Statistic statistic, @NotNull Material material, + public void decrementStatistic(@Nonnull Statistic statistic, @Nonnull Material material, int amount) throws IllegalArgumentException { } @Override - public void setStatistic(@NotNull Statistic statistic, @NotNull Material material, int newValue) + public void setStatistic(@Nonnull Statistic statistic, @Nonnull Material material, int newValue) throws IllegalArgumentException { } @Override - public void incrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType) + public void incrementStatistic(@Nonnull Statistic statistic, @Nonnull EntityType entityType) throws IllegalArgumentException { } @Override - public void decrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType) + public void decrementStatistic(@Nonnull Statistic statistic, @Nonnull EntityType entityType) throws IllegalArgumentException { } @Override - public int getStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType) + public int getStatistic(@Nonnull Statistic statistic, @Nonnull EntityType entityType) throws IllegalArgumentException { return 0; } @Override - public void incrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType, + public void incrementStatistic(@Nonnull Statistic statistic, @Nonnull EntityType entityType, int amount) throws IllegalArgumentException { } @Override - public void decrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType, + public void decrementStatistic(@Nonnull Statistic statistic, @Nonnull EntityType entityType, int amount) { } @Override - public void setStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType, + public void setStatistic(@Nonnull Statistic statistic, @Nonnull EntityType entityType, int newValue) { } diff --git a/worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIPlatform.java b/worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIPlatform.java index ca0f9efed..4956bf63b 100644 --- a/worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIPlatform.java +++ b/worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIPlatform.java @@ -32,7 +32,7 @@ import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.entity.EntityTypes; import com.sk89q.worldedit.world.registry.Registries; import org.enginehub.piston.CommandManager; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.EnumMap; @@ -164,7 +164,7 @@ class CLIPlatform extends AbstractPlatform { } @Override - public @NotNull RelighterFactory getRelighterFactory() { + public @Nonnull RelighterFactory getRelighterFactory() { return (_a, _b, _c) -> NullRelighter.INSTANCE; } diff --git a/worldedit-cli/src/main/java/com/sk89q/worldedit/cli/schematic/ClipboardWorld.java b/worldedit-cli/src/main/java/com/sk89q/worldedit/cli/schematic/ClipboardWorld.java index 4b602102e..5873b7185 100644 --- a/worldedit-cli/src/main/java/com/sk89q/worldedit/cli/schematic/ClipboardWorld.java +++ b/worldedit-cli/src/main/java/com/sk89q/worldedit/cli/schematic/ClipboardWorld.java @@ -92,7 +92,7 @@ public class ClipboardWorld extends AbstractWorld implements Clipboard, CLIWorld } @Override - public void sendFakeChunk(@org.jetbrains.annotations.Nullable Player player, ChunkPacket packet) { + public void sendFakeChunk(@Nullable Player player, ChunkPacket packet) { } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweCache.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweCache.java index 67089b862..a8ca8965e 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweCache.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/FaweCache.java @@ -35,7 +35,7 @@ import com.fastasyncworldedit.core.math.MutableBlockVector3; import com.fastasyncworldedit.core.math.MutableVector3; import com.sk89q.worldedit.world.block.BlockTypesCache; import org.apache.logging.log4j.Logger; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.Arrays; @@ -118,7 +118,7 @@ public enum FaweCache implements Trimable { public LoadingCache createCache(Supplier withInitial) { return CacheBuilder.newBuilder().build(new CacheLoader() { @Override - public V load(@NotNull T key) { + public V load(@Nonnull T key) { return withInitial.get(); } }); @@ -127,7 +127,7 @@ public enum FaweCache implements Trimable { public LoadingCache createCache(Function withInitial) { return CacheBuilder.newBuilder().build(new CacheLoader() { @Override - public V load(@NotNull T key) { + public V load(@Nonnull T key) { return withInitial.apply(key); } }); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/CFICommands.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/CFICommands.java index a3246d189..932fc1495 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/CFICommands.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/CFICommands.java @@ -82,7 +82,7 @@ //import org.enginehub.piston.annotation.param.Switch; //import org.enginehub.piston.exception.StopExecutionException; //import org.enginehub.piston.inject.InjectedValueAccess; -//import org.jetbrains.annotations.NotNull; +//import javax.annotation.Nonnull; // //@CommandContainer(superTypes = CommandPermissionsConditionGenerator.Registration.class) //public class CFICommands { @@ -160,7 +160,7 @@ // public void brush(Player player) { // CFISettings settings = assertSettings(player); // settings.popMessages(player); -// @NotNull Builder msg; +// @Nonnull Builder msg; // if (settings.getGenerator().getImageViewer() != null) { // msg = TextComponent.builder("CFI supports using brushes during creation").append(newline()) // .append(" - Place the map on a wall of item frames").append(newline()) @@ -817,7 +817,7 @@ // TextComponent.empty().clickEvent(ClickEvent.runCommand( // "/cfi randomization " + !rand)).hoverEvent(HoverEvent.showText( // TextComponent.of("/cfi randomization " + !rand))); -// @NotNull Builder builder = TextComponent.builder(">> Current Settings <<"); +// @Nonnull Builder builder = TextComponent.builder(">> Current Settings <<"); // builder.append(newline()); // builder.append(TextComponent.of("Randomization [" + Boolean.toString(rand).toUpperCase(Locale.ROOT) + "]") // .clickEvent(ClickEvent.runCommand( @@ -1040,7 +1040,7 @@ // String snow = "/cfi snow"; // // //TODO -// @NotNull Builder msg = TextComponent.builder(">> Current Settings <<").append(newline()) +// @Nonnull Builder msg = TextComponent.builder(">> Current Settings <<").append(newline()) // .append("Mask ").append(TextComponent.of("[" + mask + "]") // .hoverEvent(HoverEvent.showText(TextComponent.of("/cfi mask"))) // .clickEvent(ClickEvent.runCommand("/cfi mask"))) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Caption.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Caption.java index 63d89c99d..a35a6d9e3 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Caption.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Caption.java @@ -8,7 +8,7 @@ import com.sk89q.worldedit.util.formatting.text.TranslatableComponent; import com.sk89q.worldedit.util.formatting.text.format.Style; import com.sk89q.worldedit.util.formatting.text.format.TextColor; import com.sk89q.worldedit.util.formatting.text.serializer.legacy.LegacyComponentSerializer; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Arrays; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/database/RollbackDatabase.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/database/RollbackDatabase.java index f0f142171..f7e11331c 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/database/RollbackDatabase.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/database/RollbackDatabase.java @@ -12,7 +12,7 @@ import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.world.World; import org.apache.logging.log4j.Logger; import org.intellij.lang.annotations.Language; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.io.File; import java.io.IOException; @@ -127,7 +127,7 @@ public class RollbackDatabase extends AsyncNotifyQueue { }); } - public Future getEdit(@NotNull UUID uuid, int id) { + public Future getEdit(@Nonnull UUID uuid, int id) { return call(() -> { try (PreparedStatement stmt = connection.prepareStatement(getEditUser)) { stmt.setBytes(1, toBytes(uuid)); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/entity/MapMetadatable.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/entity/MapMetadatable.java index adbd68cf5..6c0839ab3 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/entity/MapMetadatable.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/entity/MapMetadatable.java @@ -1,6 +1,6 @@ package com.fastasyncworldedit.core.entity; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Map; @@ -48,9 +48,9 @@ public interface MapMetadatable extends Metadatable { /** * {@inheritDoc} */ - @NotNull + @Nonnull @Override - default V getMeta(String key, @NotNull V def) { + default V getMeta(String key, @Nonnull V def) { V value = (V) getRawMeta().get(key); return value == null ? def : value; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/entity/Metadatable.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/entity/Metadatable.java index 9903b43cd..88101bdaf 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/entity/Metadatable.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/entity/Metadatable.java @@ -1,7 +1,7 @@ package com.fastasyncworldedit.core.entity; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; public interface Metadatable { @@ -39,8 +39,8 @@ public interface Metadatable { * @param defaultValue the value to return if there is no metadata for the given key * @return the metadata value for the key, if present; else the default value */ - @NotNull - default V getMeta(String key, @NotNull V defaultValue) { + @Nonnull + default V getMeta(String key, @Nonnull V defaultValue) { V value = getMeta(key); return value == null ? defaultValue : value; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/RichParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/RichParser.java index 1ceefd959..1bcb72b83 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/RichParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/RichParser.java @@ -7,7 +7,7 @@ import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.internal.registry.InputParser; import com.sk89q.worldedit.util.formatting.text.TextComponent; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.Arrays; @@ -37,7 +37,7 @@ public abstract class RichParser extends InputParser { this.prefixes = aliases; } - @NotNull + @Nonnull private static Predicate validPrefix(String other) { return prefix -> { if (prefix.length() > other.length()) { @@ -47,7 +47,7 @@ public abstract class RichParser extends InputParser { }; } - @NotNull + @Nonnull private Function> extractArguments(String input) { return prefix -> { if (input.length() > prefix.length()) { @@ -111,7 +111,7 @@ public abstract class RichParser extends InputParser { * @return the resulting parsed type. * @throws InputParseException if the input couldn't be parsed correctly. */ - protected abstract E parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException; + protected abstract E parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException; /** * Extracts arguments enclosed by {@code []} into an array. diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AdjacentMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AdjacentMaskParser.java index c20b0c78f..2ff5e8bff 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AdjacentMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AdjacentMaskParser.java @@ -8,7 +8,7 @@ import com.fastasyncworldedit.core.extension.factory.parser.RichParser; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.mask.Mask; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.stream.Stream; @@ -29,7 +29,7 @@ public class AdjacentMaskParser extends RichParser { } @Override - protected Mask parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException { + protected Mask parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException { if (arguments.length == 0) { return null; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AngleMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AngleMaskParser.java index 7bca15398..615397471 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AngleMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AngleMaskParser.java @@ -9,7 +9,7 @@ import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.mask.Mask; import com.sk89q.worldedit.util.formatting.text.TextComponent; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.stream.Stream; @@ -32,7 +32,7 @@ public class AngleMaskParser extends RichParser { } @Override - protected Mask parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException { + protected Mask parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException { if (arguments.length < 2 || arguments.length > 2 + flags.length) { return null; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ExtremaMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ExtremaMaskParser.java index 2b1371fe5..92325d02a 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ExtremaMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ExtremaMaskParser.java @@ -9,7 +9,7 @@ import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.mask.Mask; import com.sk89q.worldedit.util.formatting.text.TextComponent; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.stream.Stream; @@ -32,7 +32,7 @@ public class ExtremaMaskParser extends RichParser { } @Override - protected Mask parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException { + protected Mask parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException { if (arguments.length < 2 || arguments.length > 2 + flags.length) { return null; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ROCAngleMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ROCAngleMaskParser.java index 8bf85f178..88ed881db 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ROCAngleMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ROCAngleMaskParser.java @@ -9,7 +9,7 @@ import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.mask.Mask; import com.sk89q.worldedit.util.formatting.text.TextComponent; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.stream.Stream; @@ -32,7 +32,7 @@ public class ROCAngleMaskParser extends RichParser { } @Override - protected Mask parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException { + protected Mask parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException { if (arguments.length < 2 || arguments.length > 2 + flags.length) { return null; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RadiusMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RadiusMaskParser.java index 609663629..d9bca165a 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RadiusMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RadiusMaskParser.java @@ -7,7 +7,7 @@ import com.fastasyncworldedit.core.extension.factory.parser.RichParser; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.mask.Mask; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.stream.Stream; @@ -26,7 +26,7 @@ public class RadiusMaskParser extends RichParser { } @Override - protected Mask parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException { + protected Mask parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException { if (arguments.length < 2) { return null; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RichOffsetMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RichOffsetMaskParser.java index 52f501519..90b329b0d 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RichOffsetMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RichOffsetMaskParser.java @@ -10,7 +10,7 @@ import com.sk89q.worldedit.function.mask.MaskIntersection; import com.sk89q.worldedit.function.mask.Masks; import com.sk89q.worldedit.function.mask.OffsetMask; import com.sk89q.worldedit.math.BlockVector3; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.stream.Stream; @@ -37,7 +37,7 @@ public class RichOffsetMaskParser extends RichParser { } @Override - protected Mask parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException { + protected Mask parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException { if (arguments.length != 4) { return null; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/SimplexMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/SimplexMaskParser.java index f5941fb07..f9c7f5cbf 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/SimplexMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/SimplexMaskParser.java @@ -7,7 +7,7 @@ import com.fastasyncworldedit.core.extension.factory.parser.RichParser; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.mask.Mask; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.stream.Stream; @@ -27,7 +27,7 @@ public class SimplexMaskParser extends RichParser { } @Override - protected Mask parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException { + protected Mask parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException { if (arguments.length != 3) { return null; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BiomePatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BiomePatternParser.java index 85eb3d8f4..d1dbeb40f 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BiomePatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BiomePatternParser.java @@ -11,7 +11,7 @@ import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.biome.BiomeTypes; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.stream.Stream; @@ -61,7 +61,7 @@ public class BiomePatternParser extends RichParser { } @Override - protected Pattern parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException { + protected Pattern parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException { if (arguments.length != 1) { throw new InputParseException(Caption.of("fawe.error.invalid-arguments", TextComponent.of("#biome[]"))); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BufferedPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BufferedPatternParser.java index 3d1b3a735..24e71b9b0 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BufferedPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BufferedPatternParser.java @@ -8,7 +8,7 @@ import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.util.formatting.text.TextComponent; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.stream.Stream; @@ -32,7 +32,7 @@ public class BufferedPatternParser extends RichParser { } @Override - protected Pattern parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException { + protected Pattern parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException { if (arguments.length != 1) { throw new InputParseException(Caption.of("fawe.error.command.syntax", TextComponent.of(getPrefix() + "[pattern] (e.g. " + getPrefix() + "[stone,dirt])"))); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear2DPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear2DPatternParser.java index 14c082a9c..ebd0c4827 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear2DPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear2DPatternParser.java @@ -12,7 +12,7 @@ import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.function.pattern.RandomPattern; import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.world.block.BlockStateHolder; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Set; import java.util.stream.Stream; @@ -42,7 +42,7 @@ public class Linear2DPatternParser extends RichParser { } @Override - protected Pattern parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException { + protected Pattern parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException { if (arguments.length == 0 || arguments.length > 3) { throw new InputParseException(Caption.of("fawe.error.command.syntax", TextComponent.of(getPrefix() + "[pattern] (e.g. " + getPrefix() + "[stone,dirt])"))); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear3DPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear3DPatternParser.java index 8db342b7a..93cf2d11f 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear3DPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear3DPatternParser.java @@ -12,7 +12,7 @@ import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.function.pattern.RandomPattern; import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.world.block.BlockStateHolder; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Set; import java.util.stream.Stream; @@ -43,7 +43,7 @@ public class Linear3DPatternParser extends RichParser { } @Override - protected Pattern parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException { + protected Pattern parseFromInput(@Nonnull String[] arguments, ParserContext context) throws InputParseException { if (arguments.length == 0 || arguments.length > 4) { throw new InputParseException(Caption.of("fawe.error.command.syntax", TextComponent.of(getPrefix() + "[pattern] (e.g. " + getPrefix() + "[stone,dirt])"))); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoisePatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoisePatternParser.java index d90df8a32..c281b560a 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoisePatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoisePatternParser.java @@ -12,7 +12,7 @@ import com.sk89q.worldedit.function.pattern.RandomPattern; import com.sk89q.worldedit.math.noise.NoiseGenerator; import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.world.block.BlockStateHolder; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.function.Supplier; import java.util.stream.Stream; @@ -47,7 +47,7 @@ public abstract class NoisePatternParser extends RichParser { } @Override - protected Pattern parseFromInput(@NotNull String[] arguments, ParserContext context) { + protected Pattern parseFromInput(@Nonnull String[] arguments, ParserContext context) { if (arguments.length != 2) { throw new InputParseException(Caption.of("fawe.error.command.syntax", TextComponent.of(getPrefix() + "[scale][pattern] (e.g. " + getPrefix() + "[5][dirt,stone])"))); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/EmptyClipboard.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/EmptyClipboard.java index 26e57b414..d9263a753 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/EmptyClipboard.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/EmptyClipboard.java @@ -13,8 +13,8 @@ import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockTypes; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; public final class EmptyClipboard implements Clipboard { private static final EmptyClipboard instance = new EmptyClipboard(); @@ -23,58 +23,58 @@ public final class EmptyClipboard implements Clipboard { return instance; } - @NotNull + @Nonnull public Region getRegion() { return new CuboidRegion(BlockVector3.ZERO, BlockVector3.ZERO); } - @NotNull + @Nonnull public BlockVector3 getDimensions() { return BlockVector3.ZERO; } - @NotNull + @Nonnull public BlockVector3 getOrigin() { return BlockVector3.ZERO; } - public void setOrigin(@NotNull BlockVector3 origin) { + public void setOrigin(@Nonnull BlockVector3 origin) { } - public void removeEntity(@NotNull Entity entity) { + public void removeEntity(@Nonnull Entity entity) { } - @NotNull + @Nonnull public BlockVector3 getMinimumPoint() { return BlockVector3.ZERO; } - @NotNull + @Nonnull public BlockVector3 getMaximumPoint() { return BlockVector3.ZERO; } - @NotNull - public BaseBlock getFullBlock(@NotNull BlockVector3 position) { + @Nonnull + public BaseBlock getFullBlock(@Nonnull BlockVector3 position) { return BlockTypes.AIR.getDefaultState().toBaseBlock(); } - @NotNull - public BlockState getBlock(@NotNull BlockVector3 position) { + @Nonnull + public BlockState getBlock(@Nonnull BlockVector3 position) { return BlockTypes.AIR.getDefaultState(); } @Nullable - public BiomeType getBiome(@NotNull BlockVector3 position) { + public BiomeType getBiome(@Nonnull BlockVector3 position) { return null; } - @NotNull + @Nonnull public int[] getHeightMap(@Nullable HeightMapType type) { return new int[256]; } - public boolean setBlock(@NotNull BlockVector3 position, BlockStateHolder block) throws WorldEditException { + public boolean setBlock(@Nonnull BlockVector3 position, BlockStateHolder block) throws WorldEditException { return false; } @@ -82,11 +82,11 @@ public final class EmptyClipboard implements Clipboard { return false; } - public boolean setTile(int x, int y, int z, @NotNull CompoundTag tile) throws WorldEditException { + public boolean setTile(int x, int y, int z, @Nonnull CompoundTag tile) throws WorldEditException { return false; } - public boolean setBiome(@NotNull BlockVector3 position, @NotNull BiomeType biome) { + public boolean setBiome(@Nonnull BlockVector3 position, @Nonnull BiomeType biome) { return false; } @@ -94,7 +94,7 @@ public final class EmptyClipboard implements Clipboard { return false; } - public boolean setBiome(int x, int y, int z, @NotNull BiomeType biome) { + public boolean setBiome(int x, int y, int z, @Nonnull BiomeType biome) { return false; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/LinearClipboard.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/LinearClipboard.java index d0854837a..399660453 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/LinearClipboard.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/LinearClipboard.java @@ -14,7 +14,7 @@ import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockStateHolder; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Collection; import java.util.HashSet; @@ -56,7 +56,7 @@ public abstract class LinearClipboard extends SimpleClipboard { close(); } - @NotNull + @Nonnull @Override public Iterator iterator() { return iterator(Order.YZX); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/schematic/MinecraftStructure.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/schematic/MinecraftStructure.java index 403c8399d..d684744ee 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/schematic/MinecraftStructure.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/schematic/MinecraftStructure.java @@ -31,7 +31,7 @@ import com.sk89q.worldedit.world.entity.EntityTypes; import com.sk89q.worldedit.world.storage.NBTConversions; import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap; import org.apache.logging.log4j.Logger; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.io.IOException; import java.util.ArrayList; @@ -50,7 +50,7 @@ public class MinecraftStructure implements ClipboardReader, ClipboardWriter { private NBTInputStream inputStream; private NBTOutputStream out; - public MinecraftStructure(@NotNull NBTInputStream inputStream) { + public MinecraftStructure(@Nonnull NBTInputStream inputStream) { this.inputStream = inputStream; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/filter/block/CharFilterBlock.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/filter/block/CharFilterBlock.java index 919cb32aa..b98a16f82 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/filter/block/CharFilterBlock.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/filter/block/CharFilterBlock.java @@ -20,7 +20,7 @@ import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.world.block.BlockTypesCache; import com.sk89q.worldedit.world.registry.BlockMaterial; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -443,6 +443,6 @@ public class CharFilterBlock extends ChunkFilterBlock { private interface SetDelegate { - void set(@NotNull CharFilterBlock block, char value); + void set(@Nonnull CharFilterBlock block, char value); } } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/EmptyBatchProcessor.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/EmptyBatchProcessor.java index 42bb8cd13..1db95bd48 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/EmptyBatchProcessor.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/EmptyBatchProcessor.java @@ -6,8 +6,8 @@ import com.fastasyncworldedit.core.queue.IChunkGet; import com.fastasyncworldedit.core.queue.IChunkSet; import com.sk89q.worldedit.extent.Extent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; @@ -19,29 +19,29 @@ public final class EmptyBatchProcessor implements IBatchProcessor { return instance; } - @NotNull + @Nonnull public Extent construct(@Nullable Extent child) { return child; } - @NotNull + @Nonnull public IChunkSet processSet(@Nullable IChunk chunk, @Nullable IChunkGet get, @Nullable IChunkSet set) { return set; } @Override - @NotNull + @Nonnull public Future postProcessSet(@Nullable IChunk chunk, @Nullable IChunkGet get, @Nullable IChunkSet set) { // Doesn't need to do anything return CompletableFuture.completedFuture(set); } - @NotNull + @Nonnull public IBatchProcessor join(@Nullable IBatchProcessor other) { return other; } - @NotNull + @Nonnull public IBatchProcessor joinPost(@Nullable IBatchProcessor other) { return other; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/HeightmapProcessor.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/HeightmapProcessor.java index e4956343c..53daf8f31 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/HeightmapProcessor.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/HeightmapProcessor.java @@ -10,7 +10,7 @@ import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockTypes; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.util.BitSet; import java.util.concurrent.CompletableFuture; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/MultiBatchProcessor.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/MultiBatchProcessor.java index 84ecc7c28..f12c4c46d 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/MultiBatchProcessor.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/MultiBatchProcessor.java @@ -9,7 +9,7 @@ import com.fastasyncworldedit.core.queue.IChunkSet; import com.fastasyncworldedit.core.util.StringMan; import com.google.common.cache.LoadingCache; import com.sk89q.worldedit.extent.Extent; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Arrays; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/NullProcessor.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/NullProcessor.java index 9dd296460..2ef58f42c 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/NullProcessor.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/NullProcessor.java @@ -6,8 +6,8 @@ import com.fastasyncworldedit.core.queue.IChunkGet; import com.fastasyncworldedit.core.queue.IChunkSet; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.extent.NullExtent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.concurrent.Future; @@ -19,17 +19,17 @@ public final class NullProcessor implements IBatchProcessor { } @Nullable - public IChunkSet processSet(@NotNull IChunk chunk, @NotNull IChunkGet get, @NotNull IChunkSet set) { + public IChunkSet processSet(@Nonnull IChunk chunk, @Nonnull IChunkGet get, @Nonnull IChunkSet set) { return null; } @Nullable - public Future postProcessSet(@NotNull IChunk chunk, @NotNull IChunkGet get, @NotNull IChunkSet set) { + public Future postProcessSet(@Nonnull IChunk chunk, @Nonnull IChunkGet get, @Nonnull IChunkSet set) { return null; } - @NotNull - public Extent construct(@NotNull Extent child) { + @Nonnull + public Extent construct(@Nonnull Extent child) { return new NullExtent(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/RelightProcessor.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/RelightProcessor.java index e4fafa9d3..0dfe54529 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/RelightProcessor.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/RelightProcessor.java @@ -7,7 +7,7 @@ import com.fastasyncworldedit.core.queue.IChunkSet; import com.fastasyncworldedit.core.extent.processor.ProcessorScope; import com.fastasyncworldedit.core.configuration.Settings; import com.sk89q.worldedit.extent.Extent; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/RelighterFactory.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/RelighterFactory.java index 28913177e..1bfb2fc4e 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/RelighterFactory.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/lighting/RelighterFactory.java @@ -3,7 +3,7 @@ package com.fastasyncworldedit.core.extent.processor.lighting; import com.fastasyncworldedit.core.queue.IQueueChunk; import com.fastasyncworldedit.core.queue.IQueueExtent; import com.sk89q.worldedit.world.World; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; /** * This abstracts the creation of {@link Relighter}s to allow more modular code. @@ -23,6 +23,6 @@ public interface RelighterFactory { * @param queue the queue extent to work with. * @return a new Relighter instance with the specified settings. */ - @NotNull + @Nonnull Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent queue); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/internal/io/LittleEndianOutputStream.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/internal/io/LittleEndianOutputStream.java index c6d028938..e003d8eb3 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/internal/io/LittleEndianOutputStream.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/internal/io/LittleEndianOutputStream.java @@ -1,6 +1,6 @@ package com.fastasyncworldedit.core.internal.io; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.io.DataOutput; import java.io.FilterOutputStream; @@ -48,7 +48,7 @@ public class LittleEndianOutputStream extends FilterOutputStream implements Data * @exception IOException if the underlying stream throws an IOException. */ @Override - public synchronized void write(@NotNull byte[] data, int offset, int length) + public synchronized void write(@Nonnull byte[] data, int offset, int length) throws IOException { out.write(data, offset, length); written += length; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/math/BlockVectorSet.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/math/BlockVectorSet.java index 29bad32ef..8d44c5b87 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/math/BlockVectorSet.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/math/BlockVectorSet.java @@ -5,7 +5,7 @@ import com.sk89q.worldedit.math.BlockVector3; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import it.unimi.dsi.fastutil.objects.ObjectIterator; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.AbstractCollection; import java.util.Collection; @@ -83,7 +83,7 @@ public class BlockVectorSet extends AbstractCollection implements return false; } - @NotNull + @Nonnull @Override public Iterator iterator() { final ObjectIterator> entries = localSets.int2ObjectEntrySet().iterator(); @@ -183,7 +183,7 @@ public class BlockVectorSet extends AbstractCollection implements } @Override - public boolean retainAll(@NotNull Collection c) { + public boolean retainAll(@Nonnull Collection c) { Objects.requireNonNull(c); boolean modified = false; Iterator it = iterator(); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/math/LocalBlockVectorSet.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/math/LocalBlockVectorSet.java index 6bc37ce38..2283f71a7 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/math/LocalBlockVectorSet.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/math/LocalBlockVectorSet.java @@ -3,7 +3,7 @@ package com.fastasyncworldedit.core.math; import com.fastasyncworldedit.core.util.MathMan; import com.sk89q.worldedit.math.BlockVector3; import com.zaxxer.sparsebits.SparseBitSet; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Collection; import java.util.Iterator; @@ -119,7 +119,7 @@ public class LocalBlockVectorSet implements Set { return null; } - @NotNull @Override + @Nonnull @Override public Iterator iterator() { return new Iterator() { int index = set.nextSetBit(0); @@ -155,12 +155,12 @@ public class LocalBlockVectorSet implements Set { }; } - @NotNull @Override + @Nonnull @Override public Object[] toArray() { return toArray((Object[]) null); } - @NotNull @Override + @Nonnull @Override public T[] toArray(T[] array) { int size = size(); if (array == null || array.length < size) { @@ -269,7 +269,7 @@ public class LocalBlockVectorSet implements Set { } @Override - public boolean retainAll(@NotNull Collection c) { + public boolean retainAll(@Nonnull Collection c) { boolean result = false; int size = size(); int index = -1; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/IBatchProcessor.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/IBatchProcessor.java index 47f49bc15..8a6114e9b 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/IBatchProcessor.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/IBatchProcessor.java @@ -7,7 +7,7 @@ import com.fastasyncworldedit.core.extent.processor.ProcessorScope; import com.sk89q.jnbt.CompoundTag; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.math.BlockVector3; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.util.Map; import java.util.Set; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/IChunkGet.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/IChunkGet.java index 5e63f0e66..49c6a053c 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/IChunkGet.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/IChunkGet.java @@ -7,7 +7,7 @@ import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.util.UUID; import java.util.concurrent.Future; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/NullChunkGet.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/NullChunkGet.java index f140c973e..2c7c68239 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/NullChunkGet.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/NullChunkGet.java @@ -12,8 +12,8 @@ import com.sk89q.worldedit.world.biome.BiomeTypes; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockTypes; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.Collections; import java.util.Map; @@ -28,7 +28,7 @@ public final class NullChunkGet implements IChunkGet { return instance; } - @NotNull + @Nonnull public BaseBlock getFullBlock(int x, int y, int z) { return BlockTypes.AIR.getDefaultState().toBaseBlock(); } @@ -41,12 +41,12 @@ public final class NullChunkGet implements IChunkGet { @Override public void removeSectionLighting(int layer, boolean sky) {} - @NotNull + @Nonnull public BlockState getBlock(int x, int y, int z) { return BlockTypes.AIR.getDefaultState(); } - @NotNull + @Nonnull public Map getTiles() { return Collections.emptyMap(); } @@ -62,7 +62,7 @@ public final class NullChunkGet implements IChunkGet { } @Nullable - public CompoundTag getEntity(@NotNull UUID uuid) { + public CompoundTag getEntity(@Nonnull UUID uuid) { return null; } @@ -90,11 +90,11 @@ public final class NullChunkGet implements IChunkGet { } @Nullable - public > T call(@NotNull IChunkSet set, @NotNull Runnable finalize) { + public > T call(@Nonnull IChunkSet set, @Nonnull Runnable finalize) { return null; } - @NotNull + @Nonnull public char[] load(int layer) { return FaweCache.IMP.EMPTY_CHAR_4096; } @@ -111,7 +111,7 @@ public final class NullChunkGet implements IChunkGet { return 15; } - @NotNull + @Nonnull public int[] getHeightMap(@Nullable HeightMapType type) { return new int[256]; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/NullChunk.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/NullChunk.java index f340c7e3b..822a28f32 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/NullChunk.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/NullChunk.java @@ -13,8 +13,8 @@ import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockTypes; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.Collections; import java.util.Map; @@ -45,21 +45,21 @@ public final class NullChunk implements IQueueChunk { return null; } - public void filterBlocks(@NotNull Filter filter, @NotNull ChunkFilterBlock block, @Nullable Region region, boolean full) { + public void filterBlocks(@Nonnull Filter filter, @Nonnull ChunkFilterBlock block, @Nullable Region region, boolean full) { } - public boolean setBiome(int x, int y, int z, @NotNull BiomeType biome) { + public boolean setBiome(int x, int y, int z, @Nonnull BiomeType biome) { return false; } - public boolean setTile(int x, int y, int z, @NotNull CompoundTag tag) { + public boolean setTile(int x, int y, int z, @Nonnull CompoundTag tag) { return false; } - public void setEntity(@NotNull CompoundTag tag) { + public void setEntity(@Nonnull CompoundTag tag) { } - public void removeEntity(@NotNull UUID uuid) { + public void removeEntity(@Nonnull UUID uuid) { } @Nullable @@ -71,17 +71,17 @@ public final class NullChunk implements IQueueChunk { return 15; } - @NotNull + @Nonnull public char[][] getLight() { return new char[0][]; } - @NotNull + @Nonnull public char[][] getSkyLight() { return new char[0][]; } - @NotNull + @Nonnull public int[] getHeightMap(@Nullable HeightMapType type) { return new int[256]; } @@ -124,7 +124,7 @@ public final class NullChunk implements IQueueChunk { return false; } - public void setBlocks(int layer, @NotNull char[] data) { + public void setBlocks(int layer, @Nonnull char[] data) { } @Nullable @@ -136,17 +136,17 @@ public final class NullChunk implements IQueueChunk { return false; } - @NotNull + @Nonnull public BlockState getBlock(int x, int y, int z) { return BlockTypes.__RESERVED__.getDefaultState(); } - @NotNull + @Nonnull public BaseBlock getFullBlock(int x, int y, int z) { return BlockTypes.__RESERVED__.getDefaultState().toBaseBlock(); } - @NotNull + @Nonnull public Map getTiles() { return Collections.emptyMap(); } @@ -156,7 +156,7 @@ public final class NullChunk implements IQueueChunk { return null; } - @NotNull + @Nonnull public Set getEntities() { return Collections.emptySet(); } @@ -167,7 +167,7 @@ public final class NullChunk implements IQueueChunk { } @Nullable - public CompoundTag getEntity(@NotNull UUID uuid) { + public CompoundTag getEntity(@Nonnull UUID uuid) { return null; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/regions/FuzzyRegion.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/regions/FuzzyRegion.java index 2120c12e6..358787150 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/regions/FuzzyRegion.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/regions/FuzzyRegion.java @@ -11,7 +11,7 @@ import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.regions.AbstractRegion; import com.sk89q.worldedit.regions.RegionOperationException; import com.sk89q.worldedit.world.World; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Iterator; @@ -57,7 +57,7 @@ public class FuzzyRegion extends AbstractRegion { Operations.completeBlindly(search); } - @NotNull + @Nonnull @Override public Iterator iterator() { return set.iterator(); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/regions/IDelegateRegion.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/regions/IDelegateRegion.java index d4a81ee97..f5e37fe7d 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/regions/IDelegateRegion.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/regions/IDelegateRegion.java @@ -6,7 +6,7 @@ import com.sk89q.worldedit.math.Vector3; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.regions.RegionOperationException; import com.sk89q.worldedit.world.World; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Iterator; import java.util.List; @@ -17,7 +17,7 @@ public interface IDelegateRegion extends Region { Region getRegion(); - @NotNull @Override + @Nonnull @Override default Iterator iterator() { return getRegion().iterator(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/registry/state/PropertyKey.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/registry/state/PropertyKey.java index 759559862..626b9f414 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/registry/state/PropertyKey.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/registry/state/PropertyKey.java @@ -1,6 +1,6 @@ package com.fastasyncworldedit.core.registry.state; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.HashMap; @@ -121,7 +121,7 @@ public class PropertyKey implements Comparable { } @Override - public int compareTo(@NotNull PropertyKey o) { + public int compareTo(@Nonnull PropertyKey o) { return Integer.compare(this.id, o.id); } } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/registry/state/PropertyKeySet.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/registry/state/PropertyKeySet.java index c936212c0..5207ed6f3 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/registry/state/PropertyKeySet.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/registry/state/PropertyKeySet.java @@ -1,6 +1,6 @@ package com.fastasyncworldedit.core.registry.state; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Arrays; import java.util.BitSet; @@ -55,21 +55,21 @@ public class PropertyKeySet implements Set { return this.bits.get(((PropertyKey) o).getId()); } - @NotNull + @Nonnull @Override public Iterator iterator() { return new PropertyKeyIterator(); } - @NotNull + @Nonnull @Override public Object[] toArray() { return toArray(new Object[0]); } - @NotNull + @Nonnull @Override - public T[] toArray(@NotNull T[] a) { + public T[] toArray(@Nonnull T[] a) { T[] array = Arrays.copyOf(a, this.bits.cardinality()); Iterator iter = iterator(); for (int i = 0; i < array.length && iter.hasNext(); i++) { @@ -95,7 +95,7 @@ public class PropertyKeySet implements Set { } @Override - public boolean containsAll(@NotNull Collection c) { + public boolean containsAll(@Nonnull Collection c) { if (c instanceof PropertyKeySet) { return ((PropertyKeySet) c).bits.intersects(this.bits); } @@ -107,7 +107,7 @@ public class PropertyKeySet implements Set { } @Override - public boolean addAll(@NotNull Collection c) { + public boolean addAll(@Nonnull Collection c) { int cardinality = this.bits.cardinality(); if (c instanceof PropertyKeySet) { this.bits.or(((PropertyKeySet) c).bits); @@ -120,7 +120,7 @@ public class PropertyKeySet implements Set { } @Override - public boolean retainAll(@NotNull Collection c) { + public boolean retainAll(@Nonnull Collection c) { int cardinality = this.bits.cardinality(); BitSet removal; if (c instanceof PropertyKeySet) { @@ -138,7 +138,7 @@ public class PropertyKeySet implements Set { } @Override - public boolean removeAll(@NotNull Collection c) { + public boolean removeAll(@Nonnull Collection c) { int cardinality = this.bits.cardinality(); if (c instanceof PropertyKeySet) { this.bits.andNot(((PropertyKeySet) c).bits); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/EditSessionBuilder.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/EditSessionBuilder.java index cebccab68..2cbc2e2b9 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/EditSessionBuilder.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/EditSessionBuilder.java @@ -43,7 +43,7 @@ import com.sk89q.worldedit.util.eventbus.EventBus; import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.world.World; import org.apache.logging.log4j.Logger; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Locale; @@ -55,7 +55,7 @@ public class EditSessionBuilder { private static final Logger LOGGER = LogManagerCompat.getLogger(); - @NotNull + @Nonnull private World world; private Player player; private FaweLimit limit; @@ -65,7 +65,7 @@ public class EditSessionBuilder { private Boolean fastmode; private Boolean checkMemory; private Boolean combineStages; - @NotNull + @Nonnull private EventBus eventBus = WorldEdit.getInstance().getEventBus(); private BlockBag blockBag; private EditSessionEvent event; @@ -89,7 +89,7 @@ public class EditSessionBuilder { * * @param world A world must be provided for all EditSession(s) */ - public EditSessionBuilder(@NotNull World world) { + public EditSessionBuilder(@Nonnull World world) { checkNotNull(world); this.world = world; } @@ -108,7 +108,7 @@ public class EditSessionBuilder { return limit(FaweLimit.MAX.copy()); } - public EditSessionBuilder limitUnprocessed(@NotNull Player player) { + public EditSessionBuilder limitUnprocessed(@Nonnull Player player) { checkNotNull(player); limitUnlimited(); FaweLimit tmp = player.getLimit(); @@ -125,7 +125,7 @@ public class EditSessionBuilder { return changeSet(new NullChangeSet(world)); } - public EditSessionBuilder world(@NotNull World world) { + public EditSessionBuilder world(@Nonnull World world) { checkNotNull(world); this.world = world; return setDirty(); @@ -199,7 +199,7 @@ public class EditSessionBuilder { return setDirty(); } - public EditSessionBuilder eventBus(@NotNull EventBus eventBus) { + public EditSessionBuilder eventBus(@Nonnull EventBus eventBus) { this.eventBus = eventBus; return setDirty(); } @@ -431,7 +431,7 @@ public class EditSessionBuilder { return new EditSession(this); } - @NotNull + @Nonnull public World getWorld() { return world; } @@ -452,7 +452,7 @@ public class EditSessionBuilder { return bypassAll; } - @NotNull + @Nonnull public FaweLimit getLimit() { return limit; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/ExtentTraverser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/ExtentTraverser.java index 175fb44f3..86333faf9 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/ExtentTraverser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/ExtentTraverser.java @@ -2,7 +2,7 @@ package com.fastasyncworldedit.core.util; import com.sk89q.worldedit.extent.AbstractDelegateExtent; import com.sk89q.worldedit.extent.Extent; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.lang.reflect.Field; @@ -10,11 +10,11 @@ public class ExtentTraverser { private final T root; private final ExtentTraverser parent; - public ExtentTraverser(@NotNull T root) { + public ExtentTraverser(@Nonnull T root) { this(root, null); } - public ExtentTraverser(@NotNull T root, ExtentTraverser parent) { + public ExtentTraverser(@Nonnull T root, ExtentTraverser parent) { this.root = root; this.parent = parent; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MainUtil.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MainUtil.java index 2fb869a29..eb5ad390a 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MainUtil.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MainUtil.java @@ -33,7 +33,6 @@ import net.jpountz.lz4.LZ4Factory; import net.jpountz.lz4.LZ4FastDecompressor; import net.jpountz.lz4.LZ4InputStream; import org.apache.logging.log4j.Logger; -import org.jetbrains.annotations.NotNull; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -389,11 +388,11 @@ public class MainUtil { return new FaweInputStream(new FastBufferedInputStream(is)); } - public static URL upload(UUID uuid, String file, String extension, @NotNull final RunnableVal writeTask) { + public static URL upload(UUID uuid, String file, String extension, @Nonnull final RunnableVal writeTask) { return upload(Settings.IMP.WEB.URL, uuid != null, uuid != null ? uuid.toString() : null, file, extension, writeTask); } - public static URL upload(String urlStr, boolean save, String uuid, String file, String extension, @NotNull final RunnableVal writeTask) { + public static URL upload(String urlStr, boolean save, String uuid, String file, String extension, @Nonnull final RunnableVal writeTask) { String filename = (file == null ? "plot" : file) + (extension != null ? "." + extension : ""); uuid = uuid == null ? UUID.randomUUID().toString() : uuid; final String website; @@ -460,7 +459,7 @@ public class MainUtil { * @param z New Z coordinate * @return New tag */ - public static @NotNull CompoundTag setPosition(@Nonnull CompoundTag tag, int x, int y, int z) { + public static @Nonnull CompoundTag setPosition(@Nonnull CompoundTag tag, int x, int y, int z) { Map value = new HashMap<>(tag.getValue()); value.put("x", new IntTag(x)); value.put("y", new IntTag(y)); @@ -475,7 +474,7 @@ public class MainUtil { * @param entity Entity * @return New tag */ - public static @NotNull CompoundTag setEntityInfo(@NotNull CompoundTag tag, @NotNull Entity entity) { + public static @Nonnull CompoundTag setEntityInfo(@Nonnull CompoundTag tag, @Nonnull Entity entity) { Map map = new HashMap<>(tag.getValue()); map.put("Id", new StringTag(entity.getState().getType().getId())); ListTag pos = (ListTag) map.get("Pos"); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/Permission.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/Permission.java index 26f5a714a..297affe18 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/Permission.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/Permission.java @@ -1,7 +1,7 @@ package com.fastasyncworldedit.core.util; import com.sk89q.worldedit.util.auth.Subject; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; public enum Permission { /* @@ -18,7 +18,7 @@ public enum Permission { } - public static boolean hasPermission(@NotNull Subject player, String permission) { + public static boolean hasPermission(@Nonnull Subject player, String permission) { if (player.hasPermission(ADMIN.permission) || player.hasPermission(permission)) { return true; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/ReflectionUtils.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/ReflectionUtils.java index 253e38469..12302c34c 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/ReflectionUtils.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/ReflectionUtils.java @@ -1,6 +1,6 @@ package com.fastasyncworldedit.core.util; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.lang.invoke.MethodHandles; import java.lang.reflect.AccessibleObject; @@ -86,7 +86,7 @@ public class ReflectionUtils { } @SuppressWarnings("unchecked") - public static T getField(@NotNull Field field, Object instance) { + public static T getField(@Nonnull Field field, Object instance) { field.setAccessible(true); try { return (T) field.get(instance); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/TaskManager.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/TaskManager.java index cb91d6631..f9b99fd93 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/TaskManager.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/TaskManager.java @@ -6,7 +6,7 @@ import com.fastasyncworldedit.core.configuration.Settings; import com.fastasyncworldedit.core.util.task.RunnableVal; import com.sk89q.worldedit.internal.util.LogManagerCompat; import org.apache.logging.log4j.Logger; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Collection; import java.util.Iterator; @@ -31,7 +31,7 @@ public abstract class TaskManager { * @param runnable the task to run * @param interval in ticks */ - public abstract int repeat(@NotNull final Runnable runnable, final int interval); + public abstract int repeat(@Nonnull final Runnable runnable, final int interval); /** * Run a repeating task asynchronously. @@ -40,21 +40,21 @@ public abstract class TaskManager { * @param interval in ticks * @return the task id number */ - public abstract int repeatAsync(@NotNull final Runnable runnable, final int interval); + public abstract int repeatAsync(@Nonnull final Runnable runnable, final int interval); /** * Run a task asynchronously. * * @param runnable the task to run */ - public abstract void async(@NotNull final Runnable runnable); + public abstract void async(@Nonnull final Runnable runnable); /** * Run a task on the main thread. * * @param runnable the task to run */ - public abstract void task(@NotNull final Runnable runnable); + public abstract void task(@Nonnull final Runnable runnable); /** * Get the public ForkJoinPool. @@ -153,7 +153,7 @@ public abstract class TaskManager { * @param runnable the task to run * @param async whether the task should run on the main thread */ - public void taskNow(@NotNull final Runnable runnable, boolean async) { + public void taskNow(@Nonnull final Runnable runnable, boolean async) { if (async) { async(runnable); } else { @@ -167,7 +167,7 @@ public abstract class TaskManager { * * @param runnable the task to run */ - public void taskNowMain(@NotNull final Runnable runnable) { + public void taskNowMain(@Nonnull final Runnable runnable) { if (Fawe.isMainThread()) { runnable.run(); } else { @@ -181,7 +181,7 @@ public abstract class TaskManager { * @param runnable the task to run * @see Fawe#isMainThread() */ - public void taskNowAsync(@NotNull final Runnable runnable) { + public void taskNowAsync(@Nonnull final Runnable runnable) { taskNow(runnable, Fawe.isMainThread()); } @@ -191,7 +191,7 @@ public abstract class TaskManager { * @param runnable the task to run. * @param async whether the task should run on the main thread */ - public void taskSoonMain(@NotNull final Runnable runnable, boolean async) { + public void taskSoonMain(@Nonnull final Runnable runnable, boolean async) { if (async) { async(runnable); } else { @@ -206,7 +206,7 @@ public abstract class TaskManager { * @param runnable the task to run * @param delay in ticks */ - public abstract void later(@NotNull final Runnable runnable, final int delay); + public abstract void later(@Nonnull final Runnable runnable, final int delay); /** * Run a task later asynchronously. @@ -214,7 +214,7 @@ public abstract class TaskManager { * @param runnable the task to run * @param delay in ticks */ - public abstract void laterAsync(@NotNull final Runnable runnable, final int delay); + public abstract void laterAsync(@Nonnull final Runnable runnable, final int delay); /** * Cancel a task. @@ -275,7 +275,7 @@ public abstract class TaskManager { } } - public void taskWhenFree(@NotNull Runnable run) { + public void taskWhenFree(@Nonnull Runnable run) { if (Fawe.isMainThread()) { run.run(); } else { @@ -288,7 +288,7 @@ public abstract class TaskManager { * - Useful if you need to access something from the Bukkit API from another thread
* - Usually wait time is around 25ms
*/ - public T syncWhenFree(@NotNull final RunnableVal function) { + public T syncWhenFree(@Nonnull final RunnableVal function) { if (Fawe.isMainThread()) { function.run(); return function.value; @@ -305,7 +305,7 @@ public abstract class TaskManager { * - Useful if you need to access something from the Bukkit API from another thread
* - Usually wait time is around 25ms
*/ - public T syncWhenFree(@NotNull final Supplier supplier) { + public T syncWhenFree(@Nonnull final Supplier supplier) { if (Fawe.isMainThread()) { return supplier.get(); } @@ -321,7 +321,7 @@ public abstract class TaskManager { * - Useful if you need to access something from the Bukkit API from another thread
* - Usually wait time is around 25ms */ - public T sync(@NotNull final RunnableVal function) { + public T sync(@Nonnull final RunnableVal function) { return sync((Supplier) function); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/AdaptedMap.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/AdaptedMap.java index 1f6047f5f..f214ff86a 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/AdaptedMap.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/AdaptedMap.java @@ -1,6 +1,6 @@ package com.fastasyncworldedit.core.util.collection; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Collections; import java.util.Map; @@ -64,7 +64,7 @@ public class AdaptedMap implements IAdaptedMap { return value2.apply(value); } - @NotNull + @Nonnull @Override public Set> entrySet() { if (isEmpty()) { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/AdaptedSetCollection.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/AdaptedSetCollection.java index bc82386de..c654c053e 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/AdaptedSetCollection.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/AdaptedSetCollection.java @@ -2,7 +2,7 @@ package com.fastasyncworldedit.core.util.collection; import com.google.common.base.Function; import com.google.common.collect.Collections2; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Collection; import java.util.Iterator; @@ -44,21 +44,21 @@ public class AdaptedSetCollection implements Set { return adapted.contains(o); } - @NotNull + @Nonnull @Override public Iterator iterator() { return adapted.iterator(); } - @NotNull + @Nonnull @Override public Object[] toArray() { return adapted.toArray(); } - @NotNull + @Nonnull @Override - public V[] toArray(@NotNull V[] a) { + public V[] toArray(@Nonnull V[] a) { return adapted.toArray(a); } @@ -73,17 +73,17 @@ public class AdaptedSetCollection implements Set { } @Override - public boolean containsAll(@NotNull Collection c) { + public boolean containsAll(@Nonnull Collection c) { return adapted.containsAll(c); } @Override - public boolean addAll(@NotNull Collection c) { + public boolean addAll(@Nonnull Collection c) { return adapted.addAll(c); } @Override - public boolean removeAll(@NotNull Collection c) { + public boolean removeAll(@Nonnull Collection c) { return adapted.removeAll(c); } @@ -93,7 +93,7 @@ public class AdaptedSetCollection implements Set { } @Override - public boolean retainAll(@NotNull Collection c) { + public boolean retainAll(@Nonnull Collection c) { return adapted.retainAll(c); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/IAdaptedMap.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/IAdaptedMap.java index da61adf66..7c8174785 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/IAdaptedMap.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/IAdaptedMap.java @@ -1,8 +1,8 @@ package com.fastasyncworldedit.core.util.collection; import com.google.common.base.Function; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.Collection; import java.util.Collections; @@ -57,7 +57,7 @@ public interface IAdaptedMap extends Map { } @Override - default void putAll(@NotNull Map m) { + default void putAll(@Nonnull Map m) { for (Entry entry : m.entrySet()) { put(entry.getKey(), entry.getValue()); } @@ -68,7 +68,7 @@ public interface IAdaptedMap extends Map { getParent().clear(); } - @NotNull + @Nonnull @Override default Set keySet() { if (isEmpty()) { @@ -77,7 +77,7 @@ public interface IAdaptedMap extends Map { return new AdaptedSetCollection<>(getParent().keySet(), this::adaptKey2); } - @NotNull + @Nonnull @Override default Collection values() { if (isEmpty()) { @@ -86,7 +86,7 @@ public interface IAdaptedMap extends Map { return new AdaptedSetCollection<>(getParent().values(), this::adaptValue2); } - @NotNull + @Nonnull @Override default Set> entrySet() { if (isEmpty()) { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/MemBlockSet.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/MemBlockSet.java index 4c6133134..ab6dd358b 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/MemBlockSet.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/MemBlockSet.java @@ -5,7 +5,7 @@ import com.sk89q.worldedit.math.BlockVector2; import com.sk89q.worldedit.math.BlockVector3; import com.fastasyncworldedit.core.math.MutableBlockVector2; import com.fastasyncworldedit.core.math.MutableBlockVector3; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.AbstractSet; import java.util.Arrays; @@ -88,7 +88,7 @@ public final class MemBlockSet extends BlockSet { @Override public Set getChunks() { return new AbstractSet() { - @NotNull + @Nonnull @Override public Iterator iterator() { return new Iterator() { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/YieldIterable.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/YieldIterable.java index 9c43415d4..5315c2f3f 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/YieldIterable.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/collection/YieldIterable.java @@ -1,6 +1,6 @@ package com.fastasyncworldedit.core.util.collection; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.io.Closeable; import java.util.Iterator; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/world/block/BlanketBaseBlock.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/world/block/BlanketBaseBlock.java index 3c19faa94..44f0007bb 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/world/block/BlanketBaseBlock.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/world/block/BlanketBaseBlock.java @@ -3,7 +3,7 @@ package com.fastasyncworldedit.core.world.block; import com.sk89q.jnbt.CompoundTag; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; /** * BaseBlock that when parsed to masks represents all BlockStates of a BlockType, whilst allowing for NBT storage @@ -14,7 +14,7 @@ public final class BlanketBaseBlock extends BaseBlock { super(blockState); } - public BlanketBaseBlock(BlockState blockState, @NotNull CompoundTag tile) { + public BlanketBaseBlock(BlockState blockState, @Nonnull CompoundTag tile) { super(blockState, tile); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java index 61f6179c7..9166892c2 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -141,8 +141,8 @@ import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.world.registry.LegacyMapper; import org.apache.logging.log4j.Logger; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.io.IOException; import java.util.ArrayList; @@ -247,7 +247,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable { private final Region[] allowedRegions; @Deprecated - public EditSession(@NotNull EventBus bus, World world, @Nullable Player player, + public EditSession(@Nonnull EventBus bus, World world, @Nullable Player player, @Nullable FaweLimit limit, @Nullable AbstractChangeSet changeSet, @Nullable RegionWrapper[] allowedRegions, @Nullable Boolean autoQueue, @Nullable Boolean fastmode, @Nullable Boolean checkMemory, @Nullable Boolean combineStages, @@ -266,7 +266,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable { * @param event the event to call with the extent */ //FAWE start - EditSessionEvent - public EditSession(@NotNull EventBus eventBus, World world, int maxBlocks, @Nullable BlockBag blockBag, EditSessionEvent event) { + public EditSession(@Nonnull EventBus eventBus, World world, int maxBlocks, @Nullable BlockBag blockBag, EditSessionEvent event) { this(eventBus, world, null, null, null, null, true, null, null, null, blockBag, event); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/HistorySubCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/HistorySubCommands.java index e4f1f4b83..fb599c46b 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/HistorySubCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/HistorySubCommands.java @@ -45,7 +45,7 @@ import org.enginehub.piston.annotation.CommandContainer; import org.enginehub.piston.annotation.param.Arg; import org.enginehub.piston.annotation.param.ArgFlag; import org.enginehub.piston.annotation.param.Switch; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import org.jetbrains.annotations.Range; import java.io.File; @@ -276,7 +276,7 @@ public class HistorySubCommands { private PaginationBox list(RollbackDatabase database, String pageCommand, List> histories, BlockVector3 origin) { return PaginationBox.fromStrings("Edits:", pageCommand, histories, new Function, Component>() { - @NotNull + @Nonnull @Override public Component apply(@Nullable Supplier input) { ChangeSet edit = input.get(); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/FloatingTreeRemover.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/FloatingTreeRemover.java index 35a35b698..428444124 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/FloatingTreeRemover.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/FloatingTreeRemover.java @@ -36,7 +36,7 @@ import com.sk89q.worldedit.world.block.BlockCategories; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockTypes; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.util.Iterator; import java.util.Set; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/FloodFillTool.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/FloodFillTool.java index c39a2aa9f..83da1b8c4 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/FloodFillTool.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/FloodFillTool.java @@ -38,7 +38,7 @@ import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockTypes; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.util.Set; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java index 24215270d..8135037b8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java @@ -36,7 +36,7 @@ import com.sk89q.worldedit.util.formatting.text.format.TextColor; import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.registry.LegacyMapper; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; /** * Looks up information about a block. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/RecursivePickaxe.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/RecursivePickaxe.java index 2e857e481..8141a38b6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/RecursivePickaxe.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/RecursivePickaxe.java @@ -35,7 +35,7 @@ import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockTypes; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.util.Set; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Platform.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Platform.java index 1f51dfb57..613abee5c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Platform.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Platform.java @@ -31,7 +31,7 @@ import com.sk89q.worldedit.world.DataFixer; import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.registry.Registries; import org.enginehub.piston.CommandManager; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.List; import java.util.Locale; @@ -231,7 +231,7 @@ public interface Platform extends Keyed { * * @return the relighter factory to be used. */ - @NotNull + @Nonnull RelighterFactory getRelighterFactory(); //FAWE end } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java index 6f6363ce7..ecbc2ff17 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java @@ -151,7 +151,7 @@ import org.enginehub.piston.part.SubCommandPart; import org.enginehub.piston.suggestion.Suggestion; import org.enginehub.piston.util.HelpGenerator; import org.enginehub.piston.util.ValueProvider; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.io.File; import java.io.IOException; @@ -380,7 +380,7 @@ public final class PlatformCommandManager { private void registerSubCommands(String name, List aliases, String desc, Consumer> handlerInstance, - @NotNull Consumer additionalConfig) { + @Nonnull Consumer additionalConfig) { commandManager.register(name, cmd -> { cmd.aliases(aliases); cmd.description(TextComponent.of(desc)); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/BlockArrayClipboard.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/BlockArrayClipboard.java index 7850a00be..4fa3a20aa 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/BlockArrayClipboard.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/BlockArrayClipboard.java @@ -37,7 +37,7 @@ import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockTypes; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Iterator; import java.util.List; @@ -280,7 +280,7 @@ public class BlockArrayClipboard implements Clipboard { return getParent().getBiomeType(x, y, z); } - @NotNull + @Nonnull @Override public Iterator iterator() { OffsetBlockVector3 mutable = new OffsetBlockVector3(origin); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java index 2270fd3f8..cd5fe76af 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java @@ -47,7 +47,7 @@ import com.sk89q.worldedit.regions.Regions; import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.block.BaseBlock; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.io.Closeable; import java.io.File; @@ -160,7 +160,7 @@ public interface Clipboard extends Extent, Iterable, Closeable { } @Override - @NotNull + @Nonnull default Iterator iterator() { return getRegion().iterator(); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java index 9a8f1c6c3..c9358f4b5 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java @@ -46,7 +46,7 @@ import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.world.block.BlockTypesCache; import org.apache.logging.log4j.Logger; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.Arrays; @@ -529,7 +529,7 @@ public class BlockTransformExtent extends ResettableExtent { * @param transform the transform * @return the same block */ - public static > B transform(@NotNull B block, @NotNull Transform transform) { + public static > B transform(@Nonnull B block, @Nonnull Transform transform) { //FAWE start - use own logic // performance critical BlockState state = block.toImmutableState(); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BlockTypeMask.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BlockTypeMask.java index 17b6e29c6..eac2aebd6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BlockTypeMask.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BlockTypeMask.java @@ -23,7 +23,7 @@ import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockTypes; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Collection; import java.util.HashSet; @@ -50,7 +50,7 @@ public class BlockTypeMask extends AbstractExtentMask { * @param extent the extent * @param blocks a list of blocks to match */ - public BlockTypeMask(Extent extent, @NotNull Collection blocks) { + public BlockTypeMask(Extent extent, @Nonnull Collection blocks) { this(extent, blocks.toArray(new BlockType[0])); } @@ -60,7 +60,7 @@ public class BlockTypeMask extends AbstractExtentMask { * @param extent the extent * @param block an array of blocks to match */ - public BlockTypeMask(Extent extent, @NotNull BlockType... block) { + public BlockTypeMask(Extent extent, @Nonnull BlockType... block) { super(extent); this.types = new boolean[BlockTypes.size()]; for (BlockType type : block) { @@ -81,7 +81,7 @@ public class BlockTypeMask extends AbstractExtentMask { * * @param blocks a list of blocks */ - public void add(@NotNull Collection blocks) { + public void add(@Nonnull Collection blocks) { checkNotNull(blocks); //FAWE start for (BlockType type : blocks) { @@ -95,7 +95,7 @@ public class BlockTypeMask extends AbstractExtentMask { * * @param block an array of blocks */ - public void add(@NotNull BlockType... block) { + public void add(@Nonnull BlockType... block) { //FAWE start - get internal id for (BlockType type : block) { if (!hasAir && (type == BlockTypes.AIR || type == BlockTypes.CAVE_AIR || type == BlockTypes.VOID_AIR)) { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/Mask.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/Mask.java index 42a2a8b75..5b6e3e97c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/Mask.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/Mask.java @@ -24,7 +24,7 @@ import com.fastasyncworldedit.core.extent.filter.MaskFilter; import com.fastasyncworldedit.core.extent.filter.block.FilterBlock; import com.fastasyncworldedit.core.function.mask.InverseMask; import com.sk89q.worldedit.math.BlockVector3; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.util.function.Consumer; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/history/changeset/ChangeSet.java b/worldedit-core/src/main/java/com/sk89q/worldedit/history/changeset/ChangeSet.java index 3bbfea529..14cb21487 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/history/changeset/ChangeSet.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/history/changeset/ChangeSet.java @@ -22,7 +22,7 @@ package com.sk89q.worldedit.history.changeset; import com.fastasyncworldedit.core.history.changeset.ChangeSetSummary; import com.sk89q.worldedit.history.change.Change; import com.sk89q.worldedit.regions.Region; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.io.Closeable; import java.io.IOException; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/CuboidRegion.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/CuboidRegion.java index f8ae1ceb0..01d312cb4 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/CuboidRegion.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/CuboidRegion.java @@ -33,7 +33,7 @@ import com.fastasyncworldedit.core.math.MutableBlockVector2; import com.fastasyncworldedit.core.math.MutableBlockVector3; import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.storage.ChunkStore; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.AbstractSet; import java.util.Iterator; @@ -329,7 +329,7 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion { //FAWE start return new AbstractSet() { - @NotNull + @Nonnull @Override public Iterator iterator() { return new Iterator() { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/RegionSelector.java b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/RegionSelector.java index 30af99121..ded6af568 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/regions/RegionSelector.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/regions/RegionSelector.java @@ -31,7 +31,7 @@ import com.sk89q.worldedit.util.formatting.text.Component; import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.util.formatting.text.format.TextColor; import com.sk89q.worldedit.world.World; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.util.Collections; import java.util.List; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/registry/state/AbstractProperty.java b/worldedit-core/src/main/java/com/sk89q/worldedit/registry/state/AbstractProperty.java index 78f370516..b2c71eba1 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/registry/state/AbstractProperty.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/registry/state/AbstractProperty.java @@ -22,7 +22,7 @@ package com.sk89q.worldedit.registry.state; import com.fastasyncworldedit.core.registry.state.PropertyKey; import com.fastasyncworldedit.core.util.MathMan; import com.sk89q.worldedit.world.block.BlockTypesCache; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; import java.util.List; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java index a686599da..f6d29f12c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java @@ -45,7 +45,7 @@ import com.fastasyncworldedit.core.registry.state.PropertyKey; import com.sk89q.worldedit.util.concurrency.LazyReference; import com.sk89q.worldedit.util.nbt.CompoundBinaryTag; import com.sk89q.worldedit.world.registry.BlockMaterial; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.util.Collections; import java.util.List; @@ -79,7 +79,7 @@ public class BlockState implements BlockStateHolder, Pattern { this.emptyBaseBlock = new BlanketBaseBlock(this); } - public BlockState(BlockType blockType, int internalId, int ordinal, @NotNull CompoundTag tile) { + public BlockState(BlockType blockType, int internalId, int ordinal, @Nonnull CompoundTag tile) { this.blockType = blockType; this.internalId = internalId; this.ordinal = ordinal; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BlockMaterial.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BlockMaterial.java index 64e801069..ab817b98f 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BlockMaterial.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BlockMaterial.java @@ -20,7 +20,7 @@ package com.sk89q.worldedit.world.registry; import com.sk89q.jnbt.CompoundTag; -import org.jetbrains.annotations.Nullable; +import javax.annotation.Nullable; /** * Describes the material for a block.