regions = plot.getRegions();
Runnable run = new Runnable() {
@Override public void run() {
@@ -81,7 +80,7 @@ public abstract class SquarePlotManager extends GridPlotManager {
return true;
}
- @Override public Location getPlotTopLocAbs(@NotNull PlotId plotId) {
+ @Override public Location getPlotTopLocAbs(@Nonnull PlotId plotId) {
int px = plotId.getX();
int pz = plotId.getY();
int x = (squarePlotWorld.ROAD_OFFSET_X + (px * (squarePlotWorld.ROAD_WIDTH + squarePlotWorld.PLOT_WIDTH))) - (int) Math
@@ -242,7 +241,7 @@ public abstract class SquarePlotManager extends GridPlotManager {
/**
* Get the bottom plot loc (some basic math).
*/
- @Override public Location getPlotBottomLocAbs(@NotNull PlotId plotId) {
+ @Override public Location getPlotBottomLocAbs(@Nonnull PlotId plotId) {
int px = plotId.getX();
int pz = plotId.getY();
int x = (squarePlotWorld.ROAD_OFFSET_X + (px * (squarePlotWorld.ROAD_WIDTH + squarePlotWorld.PLOT_WIDTH))) - squarePlotWorld.PLOT_WIDTH
diff --git a/Core/src/main/java/com/plotsquared/core/inject/factory/ChunkCoordinatorBuilderFactory.java b/Core/src/main/java/com/plotsquared/core/inject/factory/ChunkCoordinatorBuilderFactory.java
index aad7be0de..95d9ce52b 100644
--- a/Core/src/main/java/com/plotsquared/core/inject/factory/ChunkCoordinatorBuilderFactory.java
+++ b/Core/src/main/java/com/plotsquared/core/inject/factory/ChunkCoordinatorBuilderFactory.java
@@ -28,12 +28,11 @@ package com.plotsquared.core.inject.factory;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import com.plotsquared.core.queue.ChunkCoordinatorBuilder;
-import org.jetbrains.annotations.NotNull;
import javax.annotation.Nonnull;
public interface ChunkCoordinatorBuilderFactory {
- @Inject @Nonnull ChunkCoordinatorBuilder create(@Assisted @NotNull ChunkCoordinatorFactory chunkCoordinatorFactory);
+ @Inject @Nonnull ChunkCoordinatorBuilder create(@Assisted @Nonnull ChunkCoordinatorFactory chunkCoordinatorFactory);
}
diff --git a/Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java b/Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java
index 39a603831..5624f8ad8 100644
--- a/Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java
+++ b/Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java
@@ -68,7 +68,6 @@ import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.kyori.adventure.text.minimessage.Template;
import net.kyori.adventure.title.Title;
-import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -851,7 +850,7 @@ public abstract class PlotPlayer implements CommandCaller, OfflinePlotPlayer,
}
// Redefine from PermissionHolder as it's required from CommandCaller
- @Override public boolean hasPermission(@NotNull String permission) {
+ @Override public boolean hasPermission(@Nonnull String permission) {
return hasPermission(null, permission);
}
diff --git a/Core/src/main/java/com/plotsquared/core/plot/BlockBucket.java b/Core/src/main/java/com/plotsquared/core/plot/BlockBucket.java
index e09dead4d..027948fbe 100644
--- a/Core/src/main/java/com/plotsquared/core/plot/BlockBucket.java
+++ b/Core/src/main/java/com/plotsquared/core/plot/BlockBucket.java
@@ -36,7 +36,6 @@ import com.sk89q.worldedit.function.pattern.BlockPattern;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockType;
-import org.jetbrains.annotations.NotNull;
import javax.annotation.Nonnull;
import java.util.Arrays;
@@ -57,21 +56,21 @@ public final class BlockBucket implements ConfigurationSerializable {
private BlockState single;
private Pattern pattern;
- public BlockBucket(@NotNull final BlockType type) {
+ public BlockBucket(@Nonnull final BlockType type) {
this(type.getId());
this.single = type.getDefaultState();
this.pattern = new BlockPattern(this.single);
this.compiled = true;
}
- public BlockBucket(@NotNull final BlockState state) {
+ public BlockBucket(@Nonnull final BlockState state) {
this(state.getAsString());
this.single = state;
this.pattern = new BlockPattern(this.single);
this.compiled = true;
}
- public BlockBucket(@NotNull final String input) {
+ public BlockBucket(@Nonnull final String input) {
this.input = new StringBuilder(input);
}
diff --git a/Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotManager.java b/Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotManager.java
index c76c522b9..756409612 100644
--- a/Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotManager.java
+++ b/Core/src/main/java/com/plotsquared/core/plot/world/SinglePlotManager.java
@@ -35,7 +35,6 @@ import com.plotsquared.core.queue.QueueCoordinator;
import com.plotsquared.core.util.FileUtils;
import com.plotsquared.core.util.task.TaskManager;
import com.sk89q.worldedit.function.pattern.Pattern;
-import org.jetbrains.annotations.NotNull;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -56,15 +55,15 @@ public class SinglePlotManager extends PlotManager {
return PlotId.of(0, 0);
}
- @Override public Location getPlotBottomLocAbs(@Nonnull final @NotNull PlotId plotId) {
+ @Override public Location getPlotBottomLocAbs(@Nonnull final PlotId plotId) {
return Location.at(plotId.toCommaSeparatedString(), -30000000, 0, -30000000);
}
- @Override public Location getPlotTopLocAbs(@Nonnull final @NotNull PlotId plotId) {
+ @Override public Location getPlotTopLocAbs(@Nonnull final PlotId plotId) {
return Location.at(plotId.toCommaSeparatedString(), 30000000, 0, 30000000);
}
- @Override public boolean clearPlot(@NotNull Plot plot, final Runnable whenDone, @Nullable QueueCoordinator queue) {
+ @Override public boolean clearPlot(@Nonnull Plot plot, final Runnable whenDone, @Nullable QueueCoordinator queue) {
PlotSquared.platform().getSetupUtils().unload(plot.getWorldName(), false);
final File worldFolder = new File(PlotSquared.platform().getWorldContainer(), plot.getWorldName());
TaskManager.getPlatformImplementation().taskAsync(() -> {
@@ -76,68 +75,68 @@ public class SinglePlotManager extends PlotManager {
return true;
}
- @Override public boolean claimPlot(@NotNull Plot plot, @Nullable QueueCoordinator queue) {
+ @Override public boolean claimPlot(@Nonnull Plot plot, @Nullable QueueCoordinator queue) {
// TODO
return true;
}
- @Override public boolean unClaimPlot(@NotNull Plot plot, Runnable whenDone, @Nullable QueueCoordinator queue) {
+ @Override public boolean unClaimPlot(@Nonnull Plot plot, Runnable whenDone, @Nullable QueueCoordinator queue) {
if (whenDone != null) {
whenDone.run();
}
return true;
}
- @Override public Location getSignLoc(@NotNull Plot plot) {
+ @Override public Location getSignLoc(@Nonnull Plot plot) {
return null;
}
- @Override public String[] getPlotComponents(@NotNull PlotId plotId) {
+ @Override public String[] getPlotComponents(@Nonnull PlotId plotId) {
return new String[0];
}
@Override
- public boolean setComponent(@NotNull PlotId plotId, @NotNull String component, @NotNull Pattern blocks, @Nullable QueueCoordinator queue) {
+ public boolean setComponent(@Nonnull PlotId plotId, @Nonnull String component, @Nonnull Pattern blocks, @Nullable QueueCoordinator queue) {
return false;
}
- @Override public boolean createRoadEast(@NotNull Plot plot, @Nullable QueueCoordinator queue) {
+ @Override public boolean createRoadEast(@Nonnull Plot plot, @Nullable QueueCoordinator queue) {
return false;
}
- @Override public boolean createRoadSouth(@NotNull Plot plot, @Nullable QueueCoordinator queue) {
+ @Override public boolean createRoadSouth(@Nonnull Plot plot, @Nullable QueueCoordinator queue) {
return false;
}
- @Override public boolean createRoadSouthEast(@NotNull Plot plot, @Nullable QueueCoordinator queue) {
+ @Override public boolean createRoadSouthEast(@Nonnull Plot plot, @Nullable QueueCoordinator queue) {
return false;
}
- @Override public boolean removeRoadEast(@NotNull Plot plot, @Nullable QueueCoordinator queue) {
+ @Override public boolean removeRoadEast(@Nonnull Plot plot, @Nullable QueueCoordinator queue) {
return false;
}
- @Override public boolean removeRoadSouth(@NotNull Plot plot, @Nullable QueueCoordinator queue) {
+ @Override public boolean removeRoadSouth(@Nonnull Plot plot, @Nullable QueueCoordinator queue) {
return false;
}
- @Override public boolean removeRoadSouthEast(@NotNull Plot plot, @Nullable QueueCoordinator queue) {
+ @Override public boolean removeRoadSouthEast(@Nonnull Plot plot, @Nullable QueueCoordinator queue) {
return false;
}
- @Override public boolean startPlotMerge(@NotNull List plotIds, @Nullable QueueCoordinator queue) {
+ @Override public boolean startPlotMerge(@Nonnull List plotIds, @Nullable QueueCoordinator queue) {
return false;
}
- @Override public boolean startPlotUnlink(@NotNull List plotIds, @Nullable QueueCoordinator queue) {
+ @Override public boolean startPlotUnlink(@Nonnull List plotIds, @Nullable QueueCoordinator queue) {
return false;
}
- @Override public boolean finishPlotMerge(@NotNull List plotIds, @Nullable QueueCoordinator queue) {
+ @Override public boolean finishPlotMerge(@Nonnull List plotIds, @Nullable QueueCoordinator queue) {
return false;
}
- @Override public boolean finishPlotUnlink(@NotNull List plotIds, @Nullable QueueCoordinator queue) {
+ @Override public boolean finishPlotUnlink(@Nonnull List plotIds, @Nullable QueueCoordinator queue) {
return false;
}
diff --git a/Core/src/main/java/com/plotsquared/core/util/placeholders/Placeholder.java b/Core/src/main/java/com/plotsquared/core/util/placeholders/Placeholder.java
index 478a4053f..49071f9bc 100644
--- a/Core/src/main/java/com/plotsquared/core/util/placeholders/Placeholder.java
+++ b/Core/src/main/java/com/plotsquared/core/util/placeholders/Placeholder.java
@@ -27,7 +27,8 @@ package com.plotsquared.core.util.placeholders;
import com.google.common.base.Preconditions;
import com.plotsquared.core.player.PlotPlayer;
-import org.jetbrains.annotations.NotNull;
+
+import javax.annotation.Nonnull;
/**
* A placeholder is a keyed value that gets replaced by a {@link PlotPlayer player}-specific value at runtime
@@ -36,7 +37,7 @@ public abstract class Placeholder {
private final String key;
- public Placeholder(@NotNull final String key) {
+ public Placeholder(@Nonnull final String key) {
this.key = Preconditions.checkNotNull(key, "Key may not be null");
}
@@ -46,14 +47,14 @@ public abstract class Placeholder {
* @param player Player
* @return Placeholder value. Return {@code ""} if no placeholder value can be returned
*/
- @NotNull public abstract String getValue(@NotNull final PlotPlayer> player);
+ @Nonnull public abstract String getValue(@Nonnull final PlotPlayer> player);
/**
* Get the placeholder key
*
* @return Placeholder key
*/
- @NotNull public final String getKey() {
+ @Nonnull public final String getKey() {
return this.key;
}
diff --git a/Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java b/Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java
index e9f1847cd..ab4ed8778 100644
--- a/Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java
+++ b/Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java
@@ -34,9 +34,9 @@ import com.plotsquared.core.plot.flag.GlobalFlagContainer;
import com.plotsquared.core.plot.flag.PlotFlag;
import com.plotsquared.core.util.EventDispatcher;
import com.plotsquared.core.util.PlayerManager;
-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;
import java.util.Locale;
@@ -52,7 +52,7 @@ public final class PlaceholderRegistry {
private final Map placeholders;
private final EventDispatcher eventDispatcher;
- public PlaceholderRegistry(@NotNull final EventDispatcher eventDispatcher) {
+ public PlaceholderRegistry(@Nonnull final EventDispatcher eventDispatcher) {
this.placeholders = Maps.newHashMap();
this.eventDispatcher = eventDispatcher;
this.registerDefault();
@@ -124,10 +124,10 @@ public final class PlaceholderRegistry {
* @param key Placeholder key
* @param placeholderFunction Placeholder generator. Cannot return null
*/
- @SuppressWarnings("ALL") public void createPlaceholder(@NotNull final String key,
- @NotNull final Function, String> placeholderFunction) {
+ @SuppressWarnings("ALL") public void createPlaceholder(@Nonnull final String key,
+ @Nonnull final Function, String> placeholderFunction) {
this.registerPlaceholder(new Placeholder(key) {
- @Override @NotNull public String getValue(@NotNull final PlotPlayer> player) {
+ @Override @Nonnull public String getValue(@Nonnull final PlotPlayer> player) {
return placeholderFunction.apply(player);
}
});
@@ -139,10 +139,10 @@ public final class PlaceholderRegistry {
* @param key Placeholder key
* @param placeholderFunction Placeholder generator. Cannot return null
*/
- public void createPlaceholder(@NotNull final String key,
- @NotNull final BiFunction, Plot, String> placeholderFunction) {
+ public void createPlaceholder(@Nonnull final String key,
+ @Nonnull final BiFunction, Plot, String> placeholderFunction) {
this.registerPlaceholder(new PlotSpecificPlaceholder(key) {
- @Override @NotNull public String getValue(@NotNull final PlotPlayer> player, @NotNull final Plot plot) {
+ @Override @Nonnull public String getValue(@Nonnull final PlotPlayer> player, @Nonnull final Plot plot) {
return placeholderFunction.apply(player, plot);
}
});
@@ -153,7 +153,7 @@ public final class PlaceholderRegistry {
*
* @param placeholder Placeholder instance
*/
- public void registerPlaceholder(@NotNull final Placeholder placeholder) {
+ public void registerPlaceholder(@Nonnull final Placeholder placeholder) {
final Placeholder previous = this.placeholders
.put(placeholder.getKey().toLowerCase(Locale.ENGLISH),
Preconditions.checkNotNull(placeholder, "Placeholder may not be null"));
@@ -168,7 +168,7 @@ public final class PlaceholderRegistry {
* @param key Placeholder key
* @return Placeholder value
*/
- @Nullable public Placeholder getPlaceholder(@NotNull final String key) {
+ @Nullable public Placeholder getPlaceholder(@Nonnull final String key) {
return this.placeholders.get(
Preconditions.checkNotNull(key, "Key may not be null").toLowerCase(Locale.ENGLISH));
}
@@ -181,8 +181,8 @@ public final class PlaceholderRegistry {
* @param player Player to evaluate for
* @return Replacement value
*/
- @NotNull public String getPlaceholderValue(@NotNull final String key,
- @NotNull final PlotPlayer> player) {
+ @Nonnull public String getPlaceholderValue(@Nonnull final String key,
+ @Nonnull final PlotPlayer> player) {
final Placeholder placeholder = getPlaceholder(key);
if (placeholder == null) {
return "";
@@ -209,7 +209,7 @@ public final class PlaceholderRegistry {
*
* @return Unmodifiable collection of placeholders
*/
- @NotNull public Collection getPlaceholders() {
+ @Nonnull public Collection getPlaceholders() {
return Collections.unmodifiableCollection(this.placeholders.values());
}
diff --git a/Core/src/main/java/com/plotsquared/core/util/placeholders/PlotFlagPlaceholder.java b/Core/src/main/java/com/plotsquared/core/util/placeholders/PlotFlagPlaceholder.java
index 777db3ab9..acde17fac 100644
--- a/Core/src/main/java/com/plotsquared/core/util/placeholders/PlotFlagPlaceholder.java
+++ b/Core/src/main/java/com/plotsquared/core/util/placeholders/PlotFlagPlaceholder.java
@@ -29,20 +29,21 @@ import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.flag.GlobalFlagContainer;
import com.plotsquared.core.plot.flag.PlotFlag;
-import org.jetbrains.annotations.NotNull;
+
+import javax.annotation.Nonnull;
public final class PlotFlagPlaceholder extends PlotSpecificPlaceholder {
private final PlotFlag, ?> flag;
private final boolean local;
- public PlotFlagPlaceholder(@NotNull final PlotFlag, ?> flag, final boolean local) {
+ public PlotFlagPlaceholder(@Nonnull final PlotFlag, ?> flag, final boolean local) {
super(String.format("currentplot_%sflag_%s", local ? "local": "", flag.getName()));
this.flag = flag;
this.local = local;
}
- @Override @NotNull public String getValue(@NotNull final PlotPlayer> player, @NotNull final Plot plot) {
+ @Override @Nonnull public String getValue(@Nonnull final PlotPlayer> player, @Nonnull final Plot plot) {
return this.getFlagValue(plot, this.flag.getName(), !this.local);
}
@@ -57,7 +58,7 @@ public final class PlotFlagPlaceholder extends PlotSpecificPlaceholder {
* @param inherit Define if it returns only the flag set on the current plot or also inherited flags
* @return The value of flag serialized in string
*/
- @NotNull private String getFlagValue(@NotNull final Plot plot, @NotNull final String flagName, final boolean inherit) {
+ @Nonnull private String getFlagValue(@Nonnull final Plot plot, @Nonnull final String flagName, final boolean inherit) {
if (flagName.isEmpty()) {
return "";
}
diff --git a/Core/src/main/java/com/plotsquared/core/util/placeholders/PlotSpecificPlaceholder.java b/Core/src/main/java/com/plotsquared/core/util/placeholders/PlotSpecificPlaceholder.java
index 6a19e86fb..c7dc029b8 100644
--- a/Core/src/main/java/com/plotsquared/core/util/placeholders/PlotSpecificPlaceholder.java
+++ b/Core/src/main/java/com/plotsquared/core/util/placeholders/PlotSpecificPlaceholder.java
@@ -27,18 +27,19 @@ package com.plotsquared.core.util.placeholders;
import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
-import org.jetbrains.annotations.NotNull;
+
+import javax.annotation.Nonnull;
/**
* A {@link Placeholder placeholder} that requires a {@link com.plotsquared.core.plot.Plot plot}
*/
public abstract class PlotSpecificPlaceholder extends Placeholder {
- public PlotSpecificPlaceholder(@NotNull final String key) {
+ public PlotSpecificPlaceholder(@Nonnull final String key) {
super(key);
}
- @Override @NotNull public final String getValue(@NotNull final PlotPlayer> player) {
+ @Override @Nonnull public final String getValue(@Nonnull final PlotPlayer> player) {
final Plot plot = player.getCurrentPlot();
if (plot == null) {
return "";
@@ -53,7 +54,7 @@ public abstract class PlotSpecificPlaceholder extends Placeholder {
* @param plot Plot that the player is in
* @return Placeholder value, or {@code ""} if the placeholder does not apply
*/
- @NotNull public abstract String getValue(@NotNull final PlotPlayer> player,
- @NotNull final Plot plot);
+ @Nonnull public abstract String getValue(@Nonnull final PlotPlayer> player,
+ @Nonnull final Plot plot);
}
diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json
index b625a0d79..6229c9752 100644
--- a/Core/src/main/resources/lang/messages_en.json
+++ b/Core/src/main/resources/lang/messages_en.json
@@ -670,6 +670,7 @@
"commands.description.comment": "Comment on a plot.",
"commands.description.condense": "Condense a plotworld.",
"commands.description.confirm": "Confirm an action.",
+ "commands.description.continue": "Continue a plot that was previously marked as done.",
"commands.description.copy": "Copy a plot.",
"commands.description.createroadschematic": "Add a road schematic to your world using the roads around your current plot.",
"commands.description.database": "Convert/Backup Storage.",
diff --git a/build.gradle b/build.gradle
index 3ca0cf1ba..f4707156a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -14,7 +14,6 @@ buildscript {
configurations.all {
resolutionStrategy {
force("org.ow2.asm:asm:8.0.1")
- force("org.jetbrains:annotations:20.1.0")
}
}
}
@@ -96,7 +95,6 @@ subprojects { subproject ->
resolutionStrategy {
force("junit:junit:4.12")
force("com.google.guava:guava:21.0")
- force("org.jetbrains:annotations:20.1.0")
force("com.google.code.findbugs:jsr305:3.0.2")
}
}