From ec778128790e56dd0428c26e6f28b59156de340f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 11:49:34 +0100 Subject: [PATCH 01/18] build: Update com.sk89q.worldedit to v7.2.10 (#3554) Co-authored-by: Renovate Bot --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 88476b2bd..7609d9de2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,7 +17,7 @@ adventure-text-minimessage = "4.1.0-SNAPSHOT" adventure-platform-bukkit = "4.0.1" # Plugins -worldedit = "7.2.9" +worldedit = "7.2.10" fawe = "2.1.0" vault = "1.7.1" placeholderapi = "2.11.1" From b9bd9b81e6e86a6f66fb37db3b70d436db41c866 Mon Sep 17 00:00:00 2001 From: Jordan Date: Wed, 23 Mar 2022 14:04:39 +0000 Subject: [PATCH 02/18] Make confirm tasks synchronous. It was changed in 7ac3f7ca03e2ae6066b17aa101f4be82d0b541d2 (#3551) --- Core/src/main/java/com/plotsquared/core/command/Confirm.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Confirm.java b/Core/src/main/java/com/plotsquared/core/command/Confirm.java index ea50a5111..5db5f93ae 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Confirm.java +++ b/Core/src/main/java/com/plotsquared/core/command/Confirm.java @@ -48,7 +48,7 @@ public class Confirm extends SubCommand { player.sendMessage(TranslatableCaption.of("confirm.expired_confirm")); return false; } - TaskManager.runTaskAsync(command.command); + TaskManager.runTask(command.command); return true; } From 96e9a61e7c4761c77f3a764a909ffb2e4999ca50 Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Fri, 1 Apr 2022 19:30:11 +0200 Subject: [PATCH 03/18] refactor: Deprecate `Load#secToTime()` (#3558) --- .../main/java/com/plotsquared/core/command/Load.java | 7 ++++++- .../main/java/com/plotsquared/core/util/TimeUtil.java | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Load.java b/Core/src/main/java/com/plotsquared/core/command/Load.java index 91d99deeb..1d2c97ef5 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Load.java +++ b/Core/src/main/java/com/plotsquared/core/command/Load.java @@ -40,6 +40,7 @@ import com.plotsquared.core.plot.schematic.Schematic; import com.plotsquared.core.plot.world.PlotAreaManager; import com.plotsquared.core.util.Permissions; import com.plotsquared.core.util.SchematicHandler; +import com.plotsquared.core.util.TimeUtil; import com.plotsquared.core.util.task.RunnableVal; import com.plotsquared.core.util.task.TaskManager; import net.kyori.adventure.text.minimessage.Template; @@ -205,7 +206,7 @@ public class Load extends SubCommand { if (split.length < 5) { continue; } - String time = secToTime((System.currentTimeMillis() / 1000) - Long.parseLong(split[0])); + String time = TimeUtil.secToTime((System.currentTimeMillis() / 1000) - Long.parseLong(split[0])); String world = split[1]; PlotId id = PlotId.fromString(split[2] + ';' + split[3]); String size = split[4]; @@ -223,6 +224,10 @@ public class Load extends SubCommand { } } + /** + * @deprecated Use {@link TimeUtil#secToTime(long)} + */ + @Deprecated(forRemoval = true, since = "TODO") public String secToTime(long time) { StringBuilder toreturn = new StringBuilder(); if (time >= 33868800) { diff --git a/Core/src/main/java/com/plotsquared/core/util/TimeUtil.java b/Core/src/main/java/com/plotsquared/core/util/TimeUtil.java index 0e4593a4b..851649a05 100644 --- a/Core/src/main/java/com/plotsquared/core/util/TimeUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/TimeUtil.java @@ -44,27 +44,27 @@ public final class TimeUtil { StringBuilder toReturn = new StringBuilder(); if (time >= 33868800) { int years = (int) (time / 33868800); - time -= years * 33868800; + time -= years * 33868800L; toReturn.append(years).append("y "); } if (time >= 604800) { int weeks = (int) (time / 604800); - time -= weeks * 604800; + time -= weeks * 604800L; toReturn.append(weeks).append("w "); } if (time >= 86400) { int days = (int) (time / 86400); - time -= days * 86400; + time -= days * 86400L; toReturn.append(days).append("d "); } if (time >= 3600) { int hours = (int) (time / 3600); - time -= hours * 3600; + time -= hours * 3600L; toReturn.append(hours).append("h "); } if (time >= 60) { int minutes = (int) (time / 60); - time -= minutes * 60; + time -= minutes * 60L; toReturn.append(minutes).append("m "); } if (toReturn.length() == 0 || time > 0) { From dc5c80d8123afd4ff8997078901f2133ba3c6052 Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Fri, 1 Apr 2022 19:30:37 +0200 Subject: [PATCH 04/18] clean up PlayerCommandPreprocess listener (#3557) --- .../bukkit/listener/PlayerEventListener.java | 112 +++++++++--------- .../com/plotsquared/core/util/RegExUtil.java | 1 + 2 files changed, 57 insertions(+), 56 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java index 8628daa02..06110b633 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java @@ -76,7 +76,6 @@ import com.plotsquared.core.util.EventDispatcher; import com.plotsquared.core.util.MathMan; import com.plotsquared.core.util.Permissions; import com.plotsquared.core.util.PremiumVerification; -import com.plotsquared.core.util.RegExUtil; import com.plotsquared.core.util.entity.EntityCategories; import com.plotsquared.core.util.task.TaskManager; import com.plotsquared.core.util.task.TaskTime; @@ -223,10 +222,9 @@ public class PlayerEventListener extends PlotListener implements Listener { } } - @SuppressWarnings("StringSplitter") @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) public void playerCommand(PlayerCommandPreprocessEvent event) { - String msg = event.getMessage().toLowerCase().replaceAll("/", "").trim(); + String msg = event.getMessage().replace("/", "").toLowerCase(Locale.ROOT).trim(); if (msg.isEmpty()) { return; } @@ -240,11 +238,9 @@ public class PlayerEventListener extends PlotListener implements Listener { String[] parts = msg.split(" "); Plot plot = plotPlayer.getCurrentPlot(); // Check WorldEdit - switch (parts[0].toLowerCase()) { + switch (parts[0]) { case "up": - case "/up": case "worldedit:up": - case "worldedit:/up": if (plot == null || (!plot.isAdded(plotPlayer.getUUID()) && !Permissions .hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_BUILD_OTHER, true))) { event.setCancelled(true); @@ -258,63 +254,67 @@ public class PlayerEventListener extends PlotListener implements Listener { List blockedCommands = plot != null ? plot.getFlag(BlockedCmdsFlag.class) : area.getFlag(BlockedCmdsFlag.class); - if (!blockedCommands.isEmpty() && !Permissions - .hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_INTERACT_BLOCKED_CMDS)) { - String part = parts[0]; - if (parts[0].contains(":")) { - part = parts[0].split(":")[1]; - msg = msg.replace(parts[0].split(":")[0] + ':', ""); - } - String s1 = part; - List aliases = new ArrayList<>(); - for (HelpTopic cmdLabel : Bukkit.getServer().getHelpMap().getHelpTopics()) { - if (part.equals(cmdLabel.getName())) { - break; - } - String label = cmdLabel.getName().replaceFirst("/", ""); - if (aliases.contains(label)) { - continue; - } - PluginCommand p; - if ((p = Bukkit.getPluginCommand(label)) != null) { - for (String a : p.getAliases()) { - if (aliases.contains(a)) { - continue; - } - aliases.add(a); - a = a.replaceFirst("/", ""); - if (!a.equals(label) && a.equals(part)) { - part = label; - break; - } - } - } - } - if (!s1.equals(part)) { - msg = msg.replace(s1, part); - } - for (String s : blockedCommands) { - Pattern pattern; - if (!RegExUtil.compiledPatterns.containsKey(s)) { - RegExUtil.compiledPatterns.put(s, pattern = Pattern.compile(s)); + if (blockedCommands.isEmpty()) { + return; + } + if (Permissions.hasPermission(plotPlayer, Permission.PERMISSION_ADMIN_INTERACT_BLOCKED_CMDS)) { + return; + } + // When using namespaced commands, we're not interested in the namespace + String part = parts[0]; + if (part.contains(":")) { + String[] namespaced = part.split(":"); + part = namespaced[1]; + msg = msg.substring(namespaced[0].length() + 1); + } + msg = replaceAliases(msg, part); + for (String blocked : blockedCommands) { + if (blocked.equalsIgnoreCase(msg)) { + String perm; + if (plot != null && plot.isAdded(plotPlayer.getUUID())) { + perm = "plots.admin.command.blocked-cmds.shared"; } else { - pattern = RegExUtil.compiledPatterns.get(s); + perm = "plots.admin.command.blocked-cmds.road"; } - if (pattern.matcher(msg).matches()) { - String perm; - if (plot != null && plot.isAdded(plotPlayer.getUUID())) { - perm = "plots.admin.command.blocked-cmds.shared"; - } else { - perm = "plots.admin.command.blocked-cmds.road"; + if (!Permissions.hasPermission(plotPlayer, perm)) { + plotPlayer.sendMessage(TranslatableCaption.of("blockedcmds.command_blocked")); + event.setCancelled(true); + } + return; + } + } + } + + private String replaceAliases(String msg, String part) { + String s1 = part; + Set aliases = new HashSet<>(); + for (HelpTopic cmdLabel : Bukkit.getServer().getHelpMap().getHelpTopics()) { + if (part.equals(cmdLabel.getName())) { + break; + } + String label = cmdLabel.getName().replaceFirst("/", ""); + if (aliases.contains(label)) { + continue; + } + PluginCommand p = Bukkit.getPluginCommand(label); + if (p != null) { + for (String a : p.getAliases()) { + if (aliases.contains(a)) { + continue; } - if (!Permissions.hasPermission(plotPlayer, perm)) { - plotPlayer.sendMessage(TranslatableCaption.of("blockedcmds.command_blocked")); - event.setCancelled(true); + aliases.add(a); + a = a.replaceFirst("/", ""); + if (!a.equals(label) && a.equals(part)) { + part = label; + break; } - return; } } } + if (!s1.equals(part)) { + msg = msg.replace(s1, part); + } + return msg; } @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) diff --git a/Core/src/main/java/com/plotsquared/core/util/RegExUtil.java b/Core/src/main/java/com/plotsquared/core/util/RegExUtil.java index b45f1af68..9f504fdf0 100644 --- a/Core/src/main/java/com/plotsquared/core/util/RegExUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/RegExUtil.java @@ -29,6 +29,7 @@ import java.util.HashMap; import java.util.Map; import java.util.regex.Pattern; +@Deprecated(since = "TODO", forRemoval = true) public class RegExUtil { public static Map compiledPatterns; From 6fd73792211d7458d7e52b4580424945f3143f9a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 12:46:49 +0200 Subject: [PATCH 05/18] build: Update dependency gradle to v7.4.2 (#3560) Co-authored-by: Renovate Bot --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 00e33edef..aa991fcea 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 93571c72d12a78568c4c2de32c2def10aa064cb6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 12:47:38 +0200 Subject: [PATCH 06/18] build: Update dependency org.checkerframework:checker-qual to v3.21.4 (#3561) Co-authored-by: Renovate Bot --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7609d9de2..f5adf0588 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,7 +6,7 @@ guava = "31.0.1-jre" # Version set by Minecraft # Platform expectations paper = "1.18.1-R0.1-SNAPSHOT" -checker-qual = "3.21.3" +checker-qual = "3.21.4" guice = "5.1.0" findbugs = "3.0.1" snakeyaml = "1.30" # Version set by Bukkit From 8a80f252cfb8efb9dab52a5dbef32f62692bdfa6 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 4 Apr 2022 12:54:42 +0200 Subject: [PATCH 07/18] chore: Fill in since TODOs --- Core/src/main/java/com/plotsquared/core/command/Load.java | 2 +- Core/src/main/java/com/plotsquared/core/util/RegExUtil.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Load.java b/Core/src/main/java/com/plotsquared/core/command/Load.java index 1d2c97ef5..86878d15a 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Load.java +++ b/Core/src/main/java/com/plotsquared/core/command/Load.java @@ -227,7 +227,7 @@ public class Load extends SubCommand { /** * @deprecated Use {@link TimeUtil#secToTime(long)} */ - @Deprecated(forRemoval = true, since = "TODO") + @Deprecated(forRemoval = true, since = "6.6.2") public String secToTime(long time) { StringBuilder toreturn = new StringBuilder(); if (time >= 33868800) { diff --git a/Core/src/main/java/com/plotsquared/core/util/RegExUtil.java b/Core/src/main/java/com/plotsquared/core/util/RegExUtil.java index 9f504fdf0..bf6113089 100644 --- a/Core/src/main/java/com/plotsquared/core/util/RegExUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/RegExUtil.java @@ -29,7 +29,7 @@ import java.util.HashMap; import java.util.Map; import java.util.regex.Pattern; -@Deprecated(since = "TODO", forRemoval = true) +@Deprecated(since = "6.6.2", forRemoval = true) public class RegExUtil { public static Map compiledPatterns; From c28177d6afb5c42f3ab5dbd690a888cd831bff68 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 4 Apr 2022 12:56:13 +0200 Subject: [PATCH 08/18] build: Release 6.6.2 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2747a97a4..d70fcb5c8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,7 +18,7 @@ plugins { idea } -version = "6.6.2-SNAPSHOT" +version = "6.6.2" allprojects { group = "com.plotsquared" From c13f544390a802a6443d51908f634f5b801d1864 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 4 Apr 2022 13:03:49 +0200 Subject: [PATCH 09/18] build: Back to snapshot for development --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index d70fcb5c8..859282be2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,7 +18,7 @@ plugins { idea } -version = "6.6.2" +version = "6.6.3-SNAPSHOT" allprojects { group = "com.plotsquared" From c4aa497a2b075552854cfe30dd0bc2f172e7077d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 15:31:53 +0200 Subject: [PATCH 10/18] build: Update actions/setup-java action to v3.1.0 (#3563) * build: Update actions/setup-java action to v3.1.0 * Update build.yml Co-authored-by: Renovate Bot Co-authored-by: Alexander Brandes --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce96082ac..5926f3a57 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,11 +8,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v3.0.0 + uses: actions/checkout@v3 - name: Validate Gradle Wrapper" - uses: gradle/wrapper-validation-action@v1.0.4 + uses: gradle/wrapper-validation-action@v1 - name: Setup Java - uses: actions/setup-java@v3.0.0 + uses: actions/setup-java@v3 with: distribution: temurin java-version: 17 From b2c9311a47db8769ab58866f407439f8f5ff02cb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 15:32:02 +0200 Subject: [PATCH 11/18] build: Update com.fastasyncworldedit to v2.1.1 (#3562) Co-authored-by: Renovate Bot --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f5adf0588..1a44f8b36 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,7 +18,7 @@ adventure-platform-bukkit = "4.0.1" # Plugins worldedit = "7.2.10" -fawe = "2.1.0" +fawe = "2.1.1" vault = "1.7.1" placeholderapi = "2.11.1" luckperms = "5.4" From 8454c29c913daf4e4827dd37946a402cad8fb2ea Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Mon, 11 Apr 2022 16:38:02 +0200 Subject: [PATCH 12/18] fix: Make PlayerManager#resolveName blocking for entry title (#3556) --- .../main/java/com/plotsquared/core/listener/PlotListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java b/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java index aa7153370..5d3dcfaba 100644 --- a/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java +++ b/Core/src/main/java/com/plotsquared/core/listener/PlotListener.java @@ -309,7 +309,7 @@ public class PlotListener { } if ((lastPlot != null) && plot.getId().equals(lastPlot.getId()) && plot.hasOwner()) { final UUID plotOwner = plot.getOwnerAbs(); - String owner = PlayerManager.resolveName(plotOwner, false).getComponent(player); + String owner = PlayerManager.resolveName(plotOwner, true).getComponent(player); Caption header = fromFlag ? StaticCaption.of(title) : TranslatableCaption.of("titles" + ".title_entered_plot"); Caption subHeader = fromFlag ? StaticCaption.of(subtitle) : TranslatableCaption.of("titles" + From 6a54dc7effa1ef0a6304f1c70b16100547c02fb1 Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Fri, 15 Apr 2022 08:59:01 +0200 Subject: [PATCH 13/18] fix: typo (MaxBuildHeight -> MinBuildHeight) (#3572) --- .../java/com/plotsquared/core/generator/ClassicPlotManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java b/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java index 7957ac912..19de13cc6 100644 --- a/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java +++ b/Core/src/main/java/com/plotsquared/core/generator/ClassicPlotManager.java @@ -389,7 +389,7 @@ public class ClassicPlotManager extends SquarePlotManager { if (!plot.isMerged(Direction.NORTH)) { int z = bot.getZ(); for (int x = bot.getX(); x < top.getX(); x++) { - for (int y = classicPlotWorld.getMaxBuildHeight(); y <= classicPlotWorld.WALL_HEIGHT; y++) { + for (int y = classicPlotWorld.getMinBuildHeight(); y <= classicPlotWorld.WALL_HEIGHT; y++) { queue.setBlock(x, y, z, blocks); } } From 38682ecff6c64ca691da58085a88933d3a7a1a0c Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Fri, 15 Apr 2022 09:01:53 +0200 Subject: [PATCH 14/18] fix: share the QueueCoordinator in PlotModificationManager#unlinkPlot (#3571) Co-authored-by: Alexander Brandes --- .../com/plotsquared/core/plot/PlotModificationManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java b/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java index 042c2e14f..68052f02c 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java @@ -333,10 +333,9 @@ public final class PlotModificationManager { ids.add(current.getId()); } this.plot.clearRatings(); - QueueCoordinator queue = null; + QueueCoordinator queue = this.plot.getArea().getQueue(); if (createSign) { this.removeSign(); - queue = this.plot.getArea().getQueue(); } PlotManager manager = this.plot.getArea().getPlotManager(); if (createRoad) { From 73c82deeb050b30d3558074febd7d070a32e2c34 Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Tue, 19 Apr 2022 00:46:39 +0200 Subject: [PATCH 15/18] build: Switch back to upstream SquirrelID (#3575) --- build.gradle.kts | 3 +++ gradle/libs.versions.toml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 859282be2..fbb588b3a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -40,6 +40,9 @@ allprojects { maven { name = "Jitpack" url = uri("https://jitpack.io") + content { + includeModule("com.github.MilkBowl", "VaultAPI") + } } maven { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1a44f8b36..689baf52c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -33,7 +33,7 @@ arkitektonika = "2.1.1" paster = "1.1.4" bstats = "3.0.0" paperlib = "1.0.7" -squirrelid = "0.3.0" +squirrelid = "0.3.1" serverlib = "2.3.1" http4j = "1.3" @@ -78,7 +78,7 @@ prtree = { group = "com.intellectualsites.prtree", name = "PRTree", version.ref aopalliance = { group = "aopalliance", name = "aopalliance", version.ref = "aopalliance" } cloudServices = { group = "cloud.commandframework", name = "cloud-services", version.ref = "cloud-services" } mvdwapi = { group = "com.intellectualsites.mvdwplaceholderapi", name = "MVdWPlaceholderAPI", version.ref = "mvdwapi" } -squirrelid = { group = "com.github.EngineHub", name = "SquirrelID", version.ref = "squirrelid" } +squirrelid = { group = "org.enginehub", name = "squirrelid", version.ref = "squirrelid" } serverlib = { group = "dev.notmyfault.serverlib", name = "ServerLib", version.ref = "serverlib" } bstats = { group = "org.bstats", name = "bstats-bukkit", version.ref = "bstats" } paperlib = { group = "io.papermc", name = "paperlib", version.ref = "paperlib" } From bfe3141ff15a6460e9a131c96e3e4de7e44de416 Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Tue, 19 Apr 2022 00:47:38 +0200 Subject: [PATCH 16/18] style: Emphasize project icon in idea selection (#3577) --- .gitignore | 6 ++---- .idea/icon.svg | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 .idea/icon.svg diff --git a/.gitignore b/.gitignore index a33dda199..d1add4d55 100644 --- a/.gitignore +++ b/.gitignore @@ -41,7 +41,8 @@ hs_err_pid* *.iml ## Directory-based project format: -.idea/ +/.idea/* +!/.idea/icon.svg # if you remove the above rule, at least ignore the following: # User-specific stuff: @@ -74,9 +75,6 @@ hs_err_pid* # IntelliJ /out/ -# mpeltonen/sbt-idea plugin -.idea_modules/ - # JIRA plugin atlassian-ide-plugin.xml diff --git a/.idea/icon.svg b/.idea/icon.svg new file mode 100644 index 000000000..e40b9f700 --- /dev/null +++ b/.idea/icon.svg @@ -0,0 +1,49 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From e5764b958d0e8562fc155e4a01e003c941a79e18 Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Tue, 19 Apr 2022 00:48:23 +0200 Subject: [PATCH 17/18] build: Replace jsr305 with spotbugs (#3576) --- Bukkit/build.gradle.kts | 2 +- Core/build.gradle.kts | 2 +- gradle/libs.versions.toml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Bukkit/build.gradle.kts b/Bukkit/build.gradle.kts index 8d925d183..529e2dcb2 100644 --- a/Bukkit/build.gradle.kts +++ b/Bukkit/build.gradle.kts @@ -83,7 +83,7 @@ tasks.named("shadowJar") { relocate("org.jetbrains", "com.plotsquared.core.annotations") relocate("org.intellij.lang", "com.plotsquared.core.intellij.annotations") relocate("javax.annotation", "com.plotsquared.core.annotation") - relocate("com.google.code.findbugs", "com.plotsquared.core.findbugs") + relocate("com.github.spotbugs", "com.plotsquared.core.spotbugs") relocate("javax.inject", "com.plotsquared.core.annotation.inject") // Get rid of all the libs which are 100% unused. diff --git a/Core/build.gradle.kts b/Core/build.gradle.kts index fa79fa3bb..9bf697e9d 100644 --- a/Core/build.gradle.kts +++ b/Core/build.gradle.kts @@ -22,7 +22,7 @@ dependencies { api(libs.guiceassistedinject) { exclude("com.google.inject", "guice") } - api(libs.findbugs) + api(libs.spotbugs) // Plugins compileOnly(libs.worldeditCore) { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 689baf52c..10f1156a3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ guava = "31.0.1-jre" # Version set by Minecraft paper = "1.18.1-R0.1-SNAPSHOT" checker-qual = "3.21.4" guice = "5.1.0" -findbugs = "3.0.1" +spotbugs = "4.6.0" snakeyaml = "1.30" # Version set by Bukkit # Adventure & MiniMessage @@ -56,7 +56,7 @@ log4j = { group = "org.apache.logging.log4j", name = "log4j-api", version.ref = snakeyaml = { group = "org.yaml", name = "snakeyaml", version.ref = "snakeyaml" } guice = { group = "com.google.inject", name = "guice", version.ref = "guice" } guiceassistedinject = { group = "com.google.inject.extensions", name = "guice-assistedinject", version.ref = "guice" } -findbugs = { group = "com.google.code.findbugs", name = "annotations", version.ref = "findbugs" } +spotbugs = { group = "com.github.spotbugs", name = "spotbugs-annotations", version.ref = "spotbugs" } # Adventure & MiniMessage adventure = { group = "net.kyori", name = "adventure-api", version.ref = "adventure-api" } From b11bb6fa22a56580f0a5a1b1fffd66f9e288791c Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Tue, 19 Apr 2022 00:48:51 +0200 Subject: [PATCH 18/18] make y location of homes always absolute (#3568) --- .../main/java/com/plotsquared/core/command/SetHome.java | 8 ++++++-- Core/src/main/java/com/plotsquared/core/plot/Plot.java | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/SetHome.java b/Core/src/main/java/com/plotsquared/core/command/SetHome.java index 4b9c44650..c54691c36 100644 --- a/Core/src/main/java/com/plotsquared/core/command/SetHome.java +++ b/Core/src/main/java/com/plotsquared/core/command/SetHome.java @@ -57,8 +57,12 @@ public class SetHome extends SetCommand { Plot base = plot.getBasePlot(false); Location bottom = base.getBottomAbs(); Location location = player.getLocationFull(); - BlockLoc rel = new BlockLoc(location.getX() - bottom.getX(), location.getY(), - location.getZ() - bottom.getZ(), location.getYaw(), location.getPitch() + BlockLoc rel = new BlockLoc( + location.getX() - bottom.getX(), + location.getY(), // y is absolute + location.getZ() - bottom.getZ(), + location.getYaw(), + location.getPitch() ); base.setHome(rel); player.sendMessage(TranslatableCaption.of("position.position_set")); diff --git a/Core/src/main/java/com/plotsquared/core/plot/Plot.java b/Core/src/main/java/com/plotsquared/core/plot/Plot.java index 8b0e78610..b709de857 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/Plot.java +++ b/Core/src/main/java/com/plotsquared/core/plot/Plot.java @@ -1465,7 +1465,7 @@ public class Plot { .at( bottom.getWorldName(), bottom.getX() + home.getX(), - bottom.getY() + home.getY(), + home.getY(), // y is absolute bottom.getZ() + home.getZ(), home.getYaw(), home.getPitch()