diff --git a/Bukkit/pom.xml b/Bukkit/pom.xml index 13e2e6fcf..f70fa0eba 100644 --- a/Bukkit/pom.xml +++ b/Bukkit/pom.xml @@ -21,7 +21,7 @@ com.plotsquared PlotSquared-Core - 5.12.3 + 5.12.4 compile diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java index 841470413..d81f24fa6 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java @@ -1618,6 +1618,35 @@ public class PlayerEvents extends PlotListener implements Listener { public void onBlockDispense(BlockDispenseEvent event) { Material type = event.getItem().getType(); switch (type) { + case SHULKER_BOX: + case WHITE_SHULKER_BOX: + case ORANGE_SHULKER_BOX: + case MAGENTA_SHULKER_BOX: + case LIGHT_BLUE_SHULKER_BOX: + case YELLOW_SHULKER_BOX: + case LIME_SHULKER_BOX: + case PINK_SHULKER_BOX: + case GRAY_SHULKER_BOX: + case LIGHT_GRAY_SHULKER_BOX: + case CYAN_SHULKER_BOX: + case PURPLE_SHULKER_BOX: + case BLUE_SHULKER_BOX: + case BROWN_SHULKER_BOX: + case GREEN_SHULKER_BOX: + case RED_SHULKER_BOX: + case BLACK_SHULKER_BOX: + case CARVED_PUMPKIN: + case WITHER_SKELETON_SKULL: + case FLINT_AND_STEEL: + case BONE_MEAL: + case SHEARS: + case GLASS_BOTTLE: + case GLOWSTONE: + case COD_BUCKET: + case PUFFERFISH_BUCKET: + case SALMON_BUCKET: + case TROPICAL_FISH_BUCKET: + case BUCKET: case WATER_BUCKET: case LAVA_BUCKET: { if (event.getBlock().getType() == Material.DROPPER) { @@ -1864,8 +1893,8 @@ public class PlayerEvents extends PlotListener implements Listener { Plot plot = location.getPlotAbs(); BukkitPlayer pp = BukkitUtil.getPlayer(e.getPlayer()); if (plot == null) { - if (!area.isRoadFlags() && !area.getRoadFlag(MiscInteractFlag.class) - && !Permissions.hasPermission(pp, "plots.admin.interact.road")) { + if (!area.isRoadFlags() && !area.getRoadFlag(MiscInteractFlag.class) && !Permissions + .hasPermission(pp, "plots.admin.interact.road")) { MainUtil.sendMessage(pp, Captions.NO_PERMISSION_EVENT, "plots.admin.interact.road"); e.setCancelled(true); } @@ -2601,8 +2630,8 @@ public class PlayerEvents extends PlotListener implements Listener { Captions.PERMISSION_ADMIN_INTERACT_UNOWNED); event.setCancelled(true); } - } else if ((plot != null && !plot.isAdded(pp.getUUID())) || area - .isRoadFlags()) { + } else if ((plot != null && !plot.isAdded(pp.getUUID())) || (plot == null && area + .isRoadFlags())) { final Entity entity = event.getRightClicked(); final com.sk89q.worldedit.world.entity.EntityType entityType = BukkitAdapter.adapt(entity.getType()); diff --git a/Core/src/main/java/com/plotsquared/core/PlotSquared.java b/Core/src/main/java/com/plotsquared/core/PlotSquared.java index 8df57ba4c..e9048f726 100644 --- a/Core/src/main/java/com/plotsquared/core/PlotSquared.java +++ b/Core/src/main/java/com/plotsquared/core/PlotSquared.java @@ -259,6 +259,7 @@ public class PlotSquared { if (Settings.Enabled_Components.CHUNK_PROCESSOR) { this.IMP.registerChunkProcessor(); } + startExpiryTasks(); // Create Event utility class eventDispatcher = new EventDispatcher(); // create Hybrid utility class 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 b72276026..38942ad11 100644 --- a/Core/src/main/java/com/plotsquared/core/command/HomeCommand.java +++ b/Core/src/main/java/com/plotsquared/core/command/HomeCommand.java @@ -84,7 +84,7 @@ public class HomeCommand extends Command { @NotNull private PlotQuery query(@NotNull final PlotPlayer player) { // everything plots need to have in common here - return PlotQuery.newQuery().ownedBy(player).whereBasePlot(); + return PlotQuery.newQuery().ownedBy(player); } @Override public CompletableFuture execute(PlotPlayer player, String[] args, @@ -107,6 +107,7 @@ public class HomeCommand extends Command { PlotQuery query = query(player); int page = 1; // page = index + 1 String identifier; + boolean basePlotOnly = true; switch (args.length) { case 1: identifier = args[0]; @@ -124,6 +125,7 @@ public class HomeCommand extends Command { Plot fromId = MainUtil.getPlotFromString(player, identifier, false); if (fromId != null && fromId.isOwner(player.getUUID())) { // it was a valid plot id + basePlotOnly = false; query.withPlot(fromId); break; } @@ -165,12 +167,16 @@ public class HomeCommand extends Command { break; } // as the query already filters by owner, this is fine + basePlotOnly = false; query.withPlot(plot); break; case 0: query.withSortingStrategy(SortingStrategy.SORT_BY_CREATION); break; } + if (basePlotOnly) { + query.whereBasePlot(); + } home(player, query, page, confirm, whenDone); return CompletableFuture.completedFuture(true); } diff --git a/build.gradle b/build.gradle index a841bb030..fff3ba5eb 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ ext { git = Grgit.open(dir: new File(rootDir.toString() + "/.git")) } -def ver = "5.12.3" +def ver = "5.12.4" def versuffix = "" ext { if (project.hasProperty("versionsuffix")) {