From d843d1715dcf7ee25f90c0891f795a595bf8f890 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 11 Sep 2020 15:03:48 +0100 Subject: [PATCH 1/4] Allow /plot home [area|world] --- .../java/com/plotsquared/core/command/HomeCommand.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/HomeCommand.java b/Core/src/main/java/com/plotsquared/core/command/HomeCommand.java index 42c4ff1c5..fe25c585e 100644 --- a/Core/src/main/java/com/plotsquared/core/command/HomeCommand.java +++ b/Core/src/main/java/com/plotsquared/core/command/HomeCommand.java @@ -107,6 +107,7 @@ public class HomeCommand extends Command { PlotQuery query = query(player); int page = 1; // page = index + 1 String identifier; + PlotArea plotArea; boolean basePlotOnly = true; switch (args.length) { case 1: @@ -129,12 +130,18 @@ public class HomeCommand extends Command { query.withPlot(fromId); break; } + // allow for plot home within a plot area + plotArea = PlotSquared.get().getPlotAreaByString(args[0]); + if (plotArea != null) { + query.inArea(plotArea); + break; + } // it wasn't a valid plot id, trying to find plot by alias query.withAlias(identifier); break; case 2: // we assume args[0] is a plot area and args[1] an identifier - PlotArea plotArea = PlotSquared.get().getPlotAreaByString(args[0]); + plotArea = PlotSquared.get().getPlotAreaByString(args[0]); identifier = args[1]; if (plotArea == null) { // invalid command, therefore no plots From 8547533210175f6c67263915a6ae352a2189f4cd Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 11 Sep 2020 15:04:09 +0100 Subject: [PATCH 2/4] update pom --- Bukkit/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bukkit/pom.xml b/Bukkit/pom.xml index ef3ad830a..5d2f060bc 100644 --- a/Bukkit/pom.xml +++ b/Bukkit/pom.xml @@ -21,7 +21,7 @@ com.plotsquared PlotSquared-Core - 5.13.3 + 5.13.5 compile From ff83931a3fb0fc31b0f45649959e60cc1ee395b6 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sun, 20 Sep 2020 19:42:13 +0100 Subject: [PATCH 3/4] Fix plot grant --- .../main/java/com/plotsquared/core/command/Grant.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Grant.java b/Core/src/main/java/com/plotsquared/core/command/Grant.java index 2d41da2e3..dd4add2c9 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Grant.java +++ b/Core/src/main/java/com/plotsquared/core/command/Grant.java @@ -36,6 +36,7 @@ import com.plotsquared.core.util.Permissions; import com.plotsquared.core.util.task.RunnableVal; import com.plotsquared.core.util.task.RunnableVal2; import com.plotsquared.core.util.task.RunnableVal3; +import com.plotsquared.core.uuid.UUIDMapping; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -76,8 +77,8 @@ public class Grant extends Command { } else if (throwable != null || uuids.size() != 1) { MainUtil.sendMessage(player, Captions.INVALID_PLAYER); } else { - final UUID uuid = uuids.toArray(new UUID[0])[0]; - MainUtil.getPersistentMeta(uuid, + final UUIDMapping uuid = uuids.toArray(new UUIDMapping[0])[0]; + MainUtil.getPersistentMeta(uuid.getUuid(), "grantedPlots", new RunnableVal() { @Override public void run(byte[] array) { if (arg0.equals("check")) { // check @@ -99,11 +100,11 @@ public class Grant extends Command { String key = "grantedPlots"; byte[] rawData = Ints.toByteArray(amount); - PlotPlayer online = PlotSquared.imp().getPlayerManager().getPlayerIfExists(uuid); + PlotPlayer online = PlotSquared.imp().getPlayerManager().getPlayerIfExists(uuid.getUuid()); if (online != null) { online.setPersistentMeta(key, rawData); } else { - DBFunc.addPersistentMeta(uuid, key, rawData, replace); + DBFunc.addPersistentMeta(uuid.getUuid(), key, rawData, replace); } } } From 8c4bb4140a3f288f311c49d50fc95d4d7b48328c Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sun, 20 Sep 2020 19:51:54 +0100 Subject: [PATCH 4/4] 5.13.6 --- Bukkit/pom.xml | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Bukkit/pom.xml b/Bukkit/pom.xml index 5d2f060bc..32c8c96e8 100644 --- a/Bukkit/pom.xml +++ b/Bukkit/pom.xml @@ -21,7 +21,7 @@ com.plotsquared PlotSquared-Core - 5.13.5 + 5.13.6 compile diff --git a/build.gradle b/build.gradle index c55f5f6e8..0c34173a8 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ ext { git = Grgit.open(dir: new File(rootDir.toString() + "/.git")) } -def ver = "5.13.5" +def ver = "5.13.6" def versuffix = "" ext { if (project.hasProperty("versionsuffix")) {