diff --git a/Bukkit/pom.xml b/Bukkit/pom.xml index 8e4c39634..a9f19b03b 100644 --- a/Bukkit/pom.xml +++ b/Bukkit/pom.xml @@ -21,7 +21,7 @@ com.plotsquared PlotSquared-Core - 5.13.3 + 5.13.6 compile 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); } } } 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 diff --git a/build.gradle b/build.gradle index 52ad35c9d..e605ef900 100644 --- a/build.gradle +++ b/build.gradle @@ -34,7 +34,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")) {