From 85a23442cc2004a2abb2ff4ade5e1818359ffdd3 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 18 Sep 2020 12:22:01 +0100 Subject: [PATCH 1/3] bump minimessage version to fix build --- Bukkit/build.gradle | 2 +- Bukkit/pom.xml | 2 +- Core/build.gradle | 4 ++-- Core/pom.xml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Bukkit/build.gradle b/Bukkit/build.gradle index 77f82647c..0b8bf2714 100644 --- a/Bukkit/build.gradle +++ b/Bukkit/build.gradle @@ -42,7 +42,7 @@ dependencies { } implementation("net.alpenblock:BungeePerms:4.0-dev-106") implementation("net.kyori:adventure-platform-bukkit:4.0.0-SNAPSHOT") - implementation('net.kyori:adventure-text-minimessage:3.0.0-SNAPSHOT') + implementation('net.kyori:adventure-text-minimessage:4.0.0-SNAPSHOT') compile("se.hyperver.hyperverse:Core:0.6.0-SNAPSHOT"){ transitive = false } compile('com.sk89q:squirrelid:1.0.0-SNAPSHOT'){ transitive = false } compile('be.maximvdw:MVdWPlaceholderAPI:3.1.1-SNAPSHOT'){ transitive = false } diff --git a/Bukkit/pom.xml b/Bukkit/pom.xml index 3fe1f3b6f..291bb536c 100644 --- a/Bukkit/pom.xml +++ b/Bukkit/pom.xml @@ -179,7 +179,7 @@ net.kyori adventure-text-minimessage - 3.0.0-SNAPSHOT + 4.0.0-SNAPSHOT runtime diff --git a/Core/build.gradle b/Core/build.gradle index b47d359d0..167600f33 100644 --- a/Core/build.gradle +++ b/Core/build.gradle @@ -16,7 +16,7 @@ dependencies { implementation("org.khelekore:prtree:1.7.0-SNAPSHOT") // Adventure related stuff implementation('net.kyori:adventure-api:4.0.0-SNAPSHOT') - implementation('net.kyori:adventure-text-minimessage:3.0.0-SNAPSHOT') + implementation('net.kyori:adventure-text-minimessage:4.0.0-SNAPSHOT') compile("com.google.inject:guice:4.2.3") compile("com.google.inject.extensions:guice-assistedinject:4.2.3") compile group: 'com.google.code.findbugs', name: 'annotations', version: '3.0.1' @@ -82,7 +82,7 @@ shadowJar { include(dependency('net.kyori:adventure-gson:4.0.0-SNAPSHOT')) include(dependency('net.kyori:adventure-legacy:4.0.0-SNAPSHOT')) include(dependency('net.kyori:adventure-plain:4.0.0-SNAPSHOT')) - include(dependency('net.kyori:adventure-text-minimessage:3.0.0-SNAPSHOT')) + include(dependency('net.kyori:adventure-text-minimessage:4.0.0-SNAPSHOT')) include(dependency('org.khelekore:prtree:1.7.0-SNAPSHOT')) } relocate('net.kyori.text', 'com.plotsquared.formatting.text') diff --git a/Core/pom.xml b/Core/pom.xml index e1d8a8107..50a5c1be6 100644 --- a/Core/pom.xml +++ b/Core/pom.xml @@ -113,7 +113,7 @@ net.kyori adventure-text-minimessage - 3.0.0-SNAPSHOT + 4.0.0-SNAPSHOT runtime From 41f494fbff1c7bbcc4989d96fd4669f5a9ab700f Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 18 Sep 2020 12:45:26 +0100 Subject: [PATCH 2/3] Remove jetbrains annotations --- Core/build.gradle | 1 - Core/pom.xml | 6 --- .../core/generator/HybridPlotManager.java | 3 +- .../core/generator/SquarePlotManager.java | 7 ++-- .../ChunkCoordinatorBuilderFactory.java | 3 +- .../plotsquared/core/player/PlotPlayer.java | 3 +- .../plotsquared/core/plot/BlockBucket.java | 7 ++-- .../core/plot/world/SinglePlotManager.java | 37 +++++++++---------- .../core/util/placeholders/Placeholder.java | 9 +++-- .../placeholders/PlaceholderRegistry.java | 28 +++++++------- .../placeholders/PlotFlagPlaceholder.java | 9 +++-- .../placeholders/PlotSpecificPlaceholder.java | 11 +++--- build.gradle | 2 - 13 files changed, 57 insertions(+), 69 deletions(-) diff --git a/Core/build.gradle b/Core/build.gradle index 167600f33..57300b946 100644 --- a/Core/build.gradle +++ b/Core/build.gradle @@ -12,7 +12,6 @@ dependencies { force = true } implementation("org.jetbrains.kotlin:kotlin-stdlib:1.3.72") - implementation("org.jetbrains:annotations:20.0.0") implementation("org.khelekore:prtree:1.7.0-SNAPSHOT") // Adventure related stuff implementation('net.kyori:adventure-api:4.0.0-SNAPSHOT') diff --git a/Core/pom.xml b/Core/pom.xml index 50a5c1be6..585b9a423 100644 --- a/Core/pom.xml +++ b/Core/pom.xml @@ -92,12 +92,6 @@ 1.3.72 runtime - - org.jetbrains - annotations - 20.0.0 - runtime - org.khelekore prtree diff --git a/Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java b/Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java index c16ea4c6a..95d330057 100644 --- a/Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java +++ b/Core/src/main/java/com/plotsquared/core/generator/HybridPlotManager.java @@ -46,7 +46,6 @@ 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.BlockTypes; -import org.jetbrains.annotations.NotNull; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -268,7 +267,7 @@ public class HybridPlotManager extends ClassicPlotManager { * @param plot The plot * @return The location where a sign should be */ - @Override public Location getSignLoc(@Nonnull final @NotNull Plot plot) { + @Override public Location getSignLoc(@Nonnull final Plot plot) { return hybridPlotWorld.getSignLocation(plot); } diff --git a/Core/src/main/java/com/plotsquared/core/generator/SquarePlotManager.java b/Core/src/main/java/com/plotsquared/core/generator/SquarePlotManager.java index 8c4b09fdd..54104cae5 100644 --- a/Core/src/main/java/com/plotsquared/core/generator/SquarePlotManager.java +++ b/Core/src/main/java/com/plotsquared/core/generator/SquarePlotManager.java @@ -34,7 +34,6 @@ import com.plotsquared.core.queue.QueueCoordinator; import com.plotsquared.core.util.HashUtil; import com.plotsquared.core.util.RegionManager; import com.sk89q.worldedit.regions.CuboidRegion; -import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -59,7 +58,7 @@ public abstract class SquarePlotManager extends GridPlotManager { this.regionManager = regionManager; } - @Override public boolean clearPlot(final @NotNull Plot plot, final @Nullable Runnable whenDone, @Nullable QueueCoordinator queue) { + @Override public boolean clearPlot(final @Nonnull Plot plot, final @Nullable Runnable whenDone, @Nullable QueueCoordinator queue) { final Set 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/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") } } From 4e835ed3ffad9e981c3bfbb769c758aeb356959f Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Sun, 20 Sep 2020 00:51:54 +0200 Subject: [PATCH 3/3] Add missing command description --- Core/src/main/resources/lang/messages_en.json | 1 + 1 file changed, 1 insertion(+) 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.",