mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 09:17:39 +00:00
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 <mc.cache@web.de>
This commit is contained in:
parent
5e9535db41
commit
f2ee2248e0
@ -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}")
|
||||
|
@ -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")
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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<IQueueChunk> queue) {
|
||||
public @Nonnull Relighter createRelighter(RelightMode relightMode, World world, IQueueExtent<IQueueChunk> queue) {
|
||||
return new NMSRelighter(queue,
|
||||
relightMode != null ? relightMode : RelightMode.valueOf(Settings.IMP.LIGHTING.MODE));
|
||||
}
|
||||
|
@ -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<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) {
|
||||
public List<String> onTabComplete(@Nonnull CommandSender sender, @Nonnull Command command, @Nonnull String alias, String[] args) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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)))));
|
||||
|
@ -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<BlockVector2> getReadChunks() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addReadChunks(@NotNull Set<BlockVector2> readChunks) {
|
||||
public void addReadChunks(@Nonnull Set<BlockVector2> 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<BlockVector2> consumer) {
|
||||
public void setChunkConsumer(@Nonnull Consumer<BlockVector2> consumer) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addProgressSubscriber(@NotNull ProgressSubscriber progressSubscriber) {
|
||||
public void addProgressSubscriber(@Nonnull ProgressSubscriber progressSubscriber) {
|
||||
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
public LightingMode getLightingMode() {
|
||||
return null;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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<MinecraftVersion> {
|
||||
}
|
||||
|
||||
@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<MinecraftVersion> {
|
||||
return fullPackagePath.substring(fullPackagePath.lastIndexOf('.') + 1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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.");
|
||||
|
@ -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) {
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -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 <T, V> LoadingCache<T, V> createCache(Supplier<V> withInitial) {
|
||||
return CacheBuilder.newBuilder().build(new CacheLoader<T, V>() {
|
||||
@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 <T, V> LoadingCache<T, V> createCache(Function<T, V> withInitial) {
|
||||
return CacheBuilder.newBuilder().build(new CacheLoader<T, V>() {
|
||||
@Override
|
||||
public V load(@NotNull T key) {
|
||||
public V load(@Nonnull T key) {
|
||||
return withInitial.apply(key);
|
||||
}
|
||||
});
|
||||
|
@ -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")))
|
||||
|
@ -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;
|
||||
|
@ -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<RollbackOptimizedHistory> getEdit(@NotNull UUID uuid, int id) {
|
||||
public Future<RollbackOptimizedHistory> getEdit(@Nonnull UUID uuid, int id) {
|
||||
return call(() -> {
|
||||
try (PreparedStatement stmt = connection.prepareStatement(getEditUser)) {
|
||||
stmt.setBytes(1, toBytes(uuid));
|
||||
|
@ -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> V getMeta(String key, @NotNull V def) {
|
||||
default <V> V getMeta(String key, @Nonnull V def) {
|
||||
V value = (V) getRawMeta().get(key);
|
||||
return value == null ? def : value;
|
||||
}
|
||||
|
@ -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> V getMeta(String key, @NotNull V defaultValue) {
|
||||
@Nonnull
|
||||
default <V> V getMeta(String key, @Nonnull V defaultValue) {
|
||||
V value = getMeta(key);
|
||||
return value == null ? defaultValue : value; }
|
||||
|
||||
|
@ -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<E> extends InputParser<E> {
|
||||
this.prefixes = aliases;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
private static Predicate<String> validPrefix(String other) {
|
||||
return prefix -> {
|
||||
if (prefix.length() > other.length()) {
|
||||
@ -47,7 +47,7 @@ public abstract class RichParser<E> extends InputParser<E> {
|
||||
};
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
private Function<String, Stream<? extends String>> extractArguments(String input) {
|
||||
return prefix -> {
|
||||
if (input.length() > prefix.length()) {
|
||||
@ -111,7 +111,7 @@ public abstract class RichParser<E> extends InputParser<E> {
|
||||
* @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.
|
||||
|
@ -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<Mask> {
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
@ -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<Mask> {
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
@ -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<Mask> {
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
@ -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<Mask> {
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
@ -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<Mask> {
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
@ -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<Mask> {
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
@ -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<Mask> {
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
@ -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<Pattern> {
|
||||
}
|
||||
|
||||
@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[<biome>]")));
|
||||
}
|
||||
|
@ -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<Pattern> {
|
||||
}
|
||||
|
||||
@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])")));
|
||||
|
@ -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<Pattern> {
|
||||
}
|
||||
|
||||
@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])")));
|
||||
|
@ -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<Pattern> {
|
||||
}
|
||||
|
||||
@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])")));
|
||||
|
@ -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<Pattern> {
|
||||
}
|
||||
|
||||
@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])")));
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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<BlockVector3> iterator() {
|
||||
return iterator(Order.YZX);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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<IChunkSet> 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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<IChunkSet> postProcessSet(@NotNull IChunk chunk, @NotNull IChunkGet get, @NotNull IChunkSet set) {
|
||||
public Future<IChunkSet> 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();
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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<IQueueChunk> queue);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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<BlockVector3> implements
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
public Iterator<BlockVector3> iterator() {
|
||||
final ObjectIterator<Int2ObjectMap.Entry<LocalBlockVectorSet>> entries = localSets.int2ObjectEntrySet().iterator();
|
||||
@ -183,7 +183,7 @@ public class BlockVectorSet extends AbstractCollection<BlockVector3> implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean retainAll(@NotNull Collection<?> c) {
|
||||
public boolean retainAll(@Nonnull Collection<?> c) {
|
||||
Objects.requireNonNull(c);
|
||||
boolean modified = false;
|
||||
Iterator<BlockVector3> it = iterator();
|
||||
|
@ -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<BlockVector3> {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull @Override
|
||||
@Nonnull @Override
|
||||
public Iterator<BlockVector3> iterator() {
|
||||
return new Iterator<BlockVector3>() {
|
||||
int index = set.nextSetBit(0);
|
||||
@ -155,12 +155,12 @@ public class LocalBlockVectorSet implements Set<BlockVector3> {
|
||||
};
|
||||
}
|
||||
|
||||
@NotNull @Override
|
||||
@Nonnull @Override
|
||||
public Object[] toArray() {
|
||||
return toArray((Object[]) null);
|
||||
}
|
||||
|
||||
@NotNull @Override
|
||||
@Nonnull @Override
|
||||
public <T> T[] toArray(T[] array) {
|
||||
int size = size();
|
||||
if (array == null || array.length < size) {
|
||||
@ -269,7 +269,7 @@ public class LocalBlockVectorSet implements Set<BlockVector3> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean retainAll(@NotNull Collection<?> c) {
|
||||
public boolean retainAll(@Nonnull Collection<?> c) {
|
||||
boolean result = false;
|
||||
int size = size();
|
||||
int index = -1;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<BlockVector3, CompoundTag> 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 extends Future<T>> T call(@NotNull IChunkSet set, @NotNull Runnable finalize) {
|
||||
public <T extends Future<T>> 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];
|
||||
}
|
||||
|
@ -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<BlockVector3, CompoundTag> getTiles() {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
@ -156,7 +156,7 @@ public final class NullChunk implements IQueueChunk {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
public Set<CompoundTag> 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;
|
||||
}
|
||||
|
||||
|
@ -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<BlockVector3> iterator() {
|
||||
return set.iterator();
|
||||
|
@ -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<BlockVector3> iterator() {
|
||||
return getRegion().iterator();
|
||||
}
|
||||
|
@ -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<PropertyKey> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull PropertyKey o) {
|
||||
public int compareTo(@Nonnull PropertyKey o) {
|
||||
return Integer.compare(this.id, o.id);
|
||||
}
|
||||
}
|
||||
|
@ -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<PropertyKey> {
|
||||
return this.bits.get(((PropertyKey) o).getId());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
public Iterator<PropertyKey> iterator() {
|
||||
return new PropertyKeyIterator();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
public Object[] toArray() {
|
||||
return toArray(new Object[0]);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
public <T> T[] toArray(@NotNull T[] a) {
|
||||
public <T> T[] toArray(@Nonnull T[] a) {
|
||||
T[] array = Arrays.copyOf(a, this.bits.cardinality());
|
||||
Iterator<PropertyKey> iter = iterator();
|
||||
for (int i = 0; i < array.length && iter.hasNext(); i++) {
|
||||
@ -95,7 +95,7 @@ public class PropertyKeySet implements Set<PropertyKey> {
|
||||
}
|
||||
|
||||
@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<PropertyKey> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAll(@NotNull Collection<? extends PropertyKey> c) {
|
||||
public boolean addAll(@Nonnull Collection<? extends PropertyKey> 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<PropertyKey> {
|
||||
}
|
||||
|
||||
@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<PropertyKey> {
|
||||
}
|
||||
|
||||
@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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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<T extends Extent> {
|
||||
private final T root;
|
||||
private final ExtentTraverser<T> parent;
|
||||
|
||||
public ExtentTraverser(@NotNull T root) {
|
||||
public ExtentTraverser(@Nonnull T root) {
|
||||
this(root, null);
|
||||
}
|
||||
|
||||
public ExtentTraverser(@NotNull T root, ExtentTraverser<T> parent) {
|
||||
public ExtentTraverser(@Nonnull T root, ExtentTraverser<T> parent) {
|
||||
this.root = root;
|
||||
this.parent = parent;
|
||||
}
|
||||
|
@ -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<OutputStream> writeTask) {
|
||||
public static URL upload(UUID uuid, String file, String extension, @Nonnull final RunnableVal<OutputStream> 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<OutputStream> writeTask) {
|
||||
public static URL upload(String urlStr, boolean save, String uuid, String file, String extension, @Nonnull final RunnableVal<OutputStream> 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<String, Tag> 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<String, Tag> map = new HashMap<>(tag.getValue());
|
||||
map.put("Id", new StringTag(entity.getState().getType().getId()));
|
||||
ListTag pos = (ListTag) map.get("Pos");
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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> T getField(@NotNull Field field, Object instance) {
|
||||
public static <T> T getField(@Nonnull Field field, Object instance) {
|
||||
field.setAccessible(true);
|
||||
try {
|
||||
return (T) field.get(instance);
|
||||
|
@ -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<br>
|
||||
* - Usually wait time is around 25ms<br>
|
||||
*/
|
||||
public <T> T syncWhenFree(@NotNull final RunnableVal<T> function) {
|
||||
public <T> T syncWhenFree(@Nonnull final RunnableVal<T> 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<br>
|
||||
* - Usually wait time is around 25ms<br>
|
||||
*/
|
||||
public <T> T syncWhenFree(@NotNull final Supplier<T> supplier) {
|
||||
public <T> T syncWhenFree(@Nonnull final Supplier<T> 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<br>
|
||||
* - Usually wait time is around 25ms
|
||||
*/
|
||||
public <T> T sync(@NotNull final RunnableVal<T> function) {
|
||||
public <T> T sync(@Nonnull final RunnableVal<T> function) {
|
||||
return sync((Supplier<T>) function);
|
||||
}
|
||||
|
||||
|
@ -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<K, V, K2, V2> implements IAdaptedMap<K, V, K2, V2> {
|
||||
return value2.apply(value);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
public Set<Entry<K, V>> entrySet() {
|
||||
if (isEmpty()) {
|
||||
|
@ -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<T, V> implements Set<V> {
|
||||
return adapted.contains(o);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
public Iterator<V> iterator() {
|
||||
return adapted.iterator();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
public Object[] toArray() {
|
||||
return adapted.toArray();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
public <V> V[] toArray(@NotNull V[] a) {
|
||||
public <V> V[] toArray(@Nonnull V[] a) {
|
||||
return adapted.toArray(a);
|
||||
}
|
||||
|
||||
@ -73,17 +73,17 @@ public class AdaptedSetCollection<T, V> implements Set<V> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsAll(@NotNull Collection<?> c) {
|
||||
public boolean containsAll(@Nonnull Collection<?> c) {
|
||||
return adapted.containsAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAll(@NotNull Collection<? extends V> c) {
|
||||
public boolean addAll(@Nonnull Collection<? extends V> 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<T, V> implements Set<V> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean retainAll(@NotNull Collection<?> c) {
|
||||
public boolean retainAll(@Nonnull Collection<?> c) {
|
||||
return adapted.retainAll(c);
|
||||
}
|
||||
|
||||
|
@ -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<K, V, K2, V2> extends Map<K, V> {
|
||||
}
|
||||
|
||||
@Override
|
||||
default void putAll(@NotNull Map<? extends K, ? extends V> m) {
|
||||
default void putAll(@Nonnull Map<? extends K, ? extends V> m) {
|
||||
for (Entry<? extends K, ? extends V> entry : m.entrySet()) {
|
||||
put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
@ -68,7 +68,7 @@ public interface IAdaptedMap<K, V, K2, V2> extends Map<K, V> {
|
||||
getParent().clear();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
default Set<K> keySet() {
|
||||
if (isEmpty()) {
|
||||
@ -77,7 +77,7 @@ public interface IAdaptedMap<K, V, K2, V2> extends Map<K, V> {
|
||||
return new AdaptedSetCollection<>(getParent().keySet(), this::adaptKey2);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
default Collection<V> values() {
|
||||
if (isEmpty()) {
|
||||
@ -86,7 +86,7 @@ public interface IAdaptedMap<K, V, K2, V2> extends Map<K, V> {
|
||||
return new AdaptedSetCollection<>(getParent().values(), this::adaptValue2);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
default Set<Entry<K, V>> entrySet() {
|
||||
if (isEmpty()) {
|
||||
|
@ -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<BlockVector2> getChunks() {
|
||||
return new AbstractSet<BlockVector2>() {
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
public Iterator<BlockVector2> iterator() {
|
||||
return new Iterator<BlockVector2>() {
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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<Supplier<? extends ChangeSet>> histories, BlockVector3 origin) {
|
||||
return PaginationBox.fromStrings("Edits:", pageCommand, histories, new Function<Supplier<? extends ChangeSet>, Component>() {
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
public Component apply(@Nullable Supplier<? extends ChangeSet> input) {
|
||||
ChangeSet edit = input.get();
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 <CI> void registerSubCommands(String name, List<String> aliases, String desc,
|
||||
Consumer<BiConsumer<CommandRegistration, CI>> handlerInstance,
|
||||
@NotNull Consumer<CommandManager> additionalConfig) {
|
||||
@Nonnull Consumer<CommandManager> additionalConfig) {
|
||||
commandManager.register(name, cmd -> {
|
||||
cmd.aliases(aliases);
|
||||
cmd.description(TextComponent.of(desc));
|
||||
|
@ -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<BlockVector3> iterator() {
|
||||
OffsetBlockVector3 mutable = new OffsetBlockVector3(origin);
|
||||
|
@ -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<BlockVector3>, Closeable {
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
@Nonnull
|
||||
default Iterator<BlockVector3> iterator() {
|
||||
return getRegion().iterator();
|
||||
}
|
||||
|
@ -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 extends BlockStateHolder<B>> B transform(@NotNull B block, @NotNull Transform transform) {
|
||||
public static <B extends BlockStateHolder<B>> B transform(@Nonnull B block, @Nonnull Transform transform) {
|
||||
//FAWE start - use own logic
|
||||
// performance critical
|
||||
BlockState state = block.toImmutableState();
|
||||
|
@ -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<BlockType> blocks) {
|
||||
public BlockTypeMask(Extent extent, @Nonnull Collection<BlockType> 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<BlockType> blocks) {
|
||||
public void add(@Nonnull Collection<BlockType> 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)) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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<BlockVector2>() {
|
||||
@NotNull
|
||||
@Nonnull
|
||||
@Override
|
||||
public Iterator<BlockVector2> iterator() {
|
||||
return new Iterator<BlockVector2>() {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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<BlockState>, 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;
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user