From 26173124be1d52f292226f23551e2773db11ebb9 Mon Sep 17 00:00:00 2001 From: Kevims Date: Tue, 2 Aug 2022 15:23:20 +0200 Subject: [PATCH] Update 1.1.2 (#14) Changes of this update: - `/plot clear` and `/plot dispose` do not unlink all connected merges plots anymore. - `/plot` subcommands can now be shown client-side. Fixes of this update: - `/plot setroads` y-coordinate calucalation --- .github/workflows/release.yml | 8 + README.md | 3 +- pom.xml | 2 +- .../java/ms/kevi/plotplugin/PlotPlugin.java | 12 +- .../kevi/plotplugin/command/PlotCommand.java | 41 +++- .../kevi/plotplugin/command/SubCommand.java | 4 +- .../command/defaults/AutoCommand.java | 2 +- .../command/defaults/ClaimCommand.java | 2 +- .../command/defaults/DisposeCommand.java | 16 +- .../command/defaults/MergeCommand.java | 73 +++--- .../command/defaults/SetOwnerCommand.java | 2 +- .../command/defaults/SetRoadsCommand.java | 2 +- .../kevi/plotplugin/event/PlotClaimEvent.java | 2 +- .../kevi/plotplugin/event/PlotClearEvent.java | 2 +- .../kevi/plotplugin/event/PlotEnterEvent.java | 2 +- .../ms/kevi/plotplugin/event/PlotEvent.java | 2 +- .../kevi/plotplugin/event/PlotLeaveEvent.java | 2 +- .../plotplugin/event/PlotPreClaimEvent.java | 4 +- .../plotplugin/event/PlotPreMergeEvent.java | 2 +- .../kevi/plotplugin/lang/TranslationKey.java | 1 + .../PlotLevelRegistrationListener.java | 2 +- .../plotplugin/listener/PlotListener.java | 2 +- .../kevi/plotplugin/manager/PlotManager.java | 222 ++++++++++++++---- .../kevi/plotplugin/schematic/Schematic.java | 4 +- .../java/ms/kevi/plotplugin/util/Plot.java | 18 +- .../ms/kevi/plotplugin/util/PlotConfig.java | 2 +- .../kevi/plotplugin/util/PlotSchematic.java | 2 +- .../util/async/AsyncLevelWorker.java | 2 +- src/main/resources/config.yml | 3 + src/main/resources/lang/de_DE.txt | 1 + src/main/resources/lang/en_US.txt | 1 + src/main/resources/plugin.yml | 2 +- 32 files changed, 308 insertions(+), 137 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d412e7..aab7d05 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,6 +52,14 @@ jobs: env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Delete old snapshot + uses: dev-drprasad/delete-tag-and-release@v0.2.0 + with: + delete_release: true + tag_name: ${{env.VER}}-SNAPSHOT + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Create Release id: create_release uses: actions/create-release@v1 diff --git a/README.md b/README.md index 9f1225c..8338bf9 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ Other Permissions | plot.admin.bucket.emtpy | Allows you to empty buckets from the road. | | plot.admin.break | Allows you to break blocks on the road. | | plot.admin.place | Allows you to place blocks on the road. | -| plot.merge.unlimited | Allows you to merge unlimited plots. | +| plot.merge.limit.unlimited | Allows you to merge unlimited plots. | | plot.merge.limit.\ | Limits the player to only merge up to the given amount of plots. | +| plot.limit.unlimited | Allows you to claim unlimited plots. | | plot.limit.\ | Limits the player to only claim up to the given amount of plots. | \ No newline at end of file diff --git a/pom.xml b/pom.xml index 44520f5..0a59e9a 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ms.kevi plotplugin - 1.1.1 + 1.1.2 17 diff --git a/src/main/java/ms/kevi/plotplugin/PlotPlugin.java b/src/main/java/ms/kevi/plotplugin/PlotPlugin.java index 49a48b9..eee37d4 100644 --- a/src/main/java/ms/kevi/plotplugin/PlotPlugin.java +++ b/src/main/java/ms/kevi/plotplugin/PlotPlugin.java @@ -32,10 +32,10 @@ import ms.kevi.plotplugin.manager.PlayerManager; import ms.kevi.plotplugin.manager.PlayerNameFunction; import ms.kevi.plotplugin.manager.PlotManager; +import ms.kevi.plotplugin.util.BlockEntry; import ms.kevi.plotplugin.util.PlotLevelRegistration; import ms.kevi.plotplugin.util.PlotLevelSettings; import ms.kevi.plotplugin.util.Utils; -import ms.kevi.plotplugin.util.BlockEntry; import ms.kevi.plotplugin.util.async.TaskExecutor; import java.io.BufferedReader; @@ -82,6 +82,9 @@ public class PlotPlugin extends PluginBase { @Getter private int plotsPerPage = 5; + @Getter + private boolean showCommandParams = true; + @Getter private boolean addOtherCommands = true; @@ -136,6 +139,13 @@ public void onEnable() { this.plotsPerPage = config.getInt("plots_per_page"); + if(!config.exists("show_command_params")) { + config.set("show_command_params", this.showCommandParams); + config.save(); + } + + this.showCommandParams = config.getBoolean("show_command_params"); + if(!config.exists("add_other_commands")) { config.set("add_other_commands", this.addOtherCommands); config.save(); diff --git a/src/main/java/ms/kevi/plotplugin/command/PlotCommand.java b/src/main/java/ms/kevi/plotplugin/command/PlotCommand.java index 881ebdf..79b4ebf 100644 --- a/src/main/java/ms/kevi/plotplugin/command/PlotCommand.java +++ b/src/main/java/ms/kevi/plotplugin/command/PlotCommand.java @@ -19,15 +19,14 @@ import cn.nukkit.Player; import cn.nukkit.command.Command; import cn.nukkit.command.CommandSender; +import cn.nukkit.command.data.*; import ms.kevi.plotplugin.PlotPlugin; import ms.kevi.plotplugin.command.defaults.*; import ms.kevi.plotplugin.command.other.BorderCommand; import ms.kevi.plotplugin.command.other.WallCommand; import ms.kevi.plotplugin.lang.TranslationKey; -import java.util.Arrays; -import java.util.LinkedHashSet; -import java.util.Set; +import java.util.*; /** * @author Kevims KCodeYT @@ -73,6 +72,24 @@ public PlotCommand(PlotPlugin plugin) { this.subCommands.add(new BorderCommand(this.plugin, this)); this.subCommands.add(new WallCommand(this.plugin, this)); } + + if(this.plugin.isShowCommandParams()) { + this.commandParameters.clear(); + + for(SubCommand subCommand : this.subCommands) { + final Set parameterSet = subCommand.getParameters(); + + for(String alias : subCommand.getAliases()) { + final CommandParameter[] parameters = new CommandParameter[parameterSet.size() + 1]; + parameters[0] = CommandParameter.newEnum("subcommand", false, new CommandEnum("PlotSubcommand" + alias, alias)); + + int i = 1; + for(CommandParameter parameter : parameterSet) parameters[i++] = parameter; + + this.commandParameters.put(alias, parameters); + } + } + } } @Override @@ -107,4 +124,22 @@ protected String translate(Player player, TranslationKey key, Object... params) return this.plugin.getLanguage().translate(player, key, params); } + @Override + public CommandDataVersions generateCustomCommandData(Player player) { + final CommandDataVersions versions = super.generateCustomCommandData(player); + final CommandData commandData = versions.versions.get(0); + + final Map overloads = new HashMap<>(commandData.overloads); + for(Map.Entry entry : overloads.entrySet()) { + for(SubCommand subCommand : this.subCommands) { + if(subCommand.getAliases().contains(entry.getKey())) { + if(!subCommand.hasPermission(player)) commandData.overloads.remove(entry.getKey()); + break; + } + } + } + + return versions; + } + } diff --git a/src/main/java/ms/kevi/plotplugin/command/SubCommand.java b/src/main/java/ms/kevi/plotplugin/command/SubCommand.java index 8e0f994..f04c752 100644 --- a/src/main/java/ms/kevi/plotplugin/command/SubCommand.java +++ b/src/main/java/ms/kevi/plotplugin/command/SubCommand.java @@ -18,11 +18,11 @@ import cn.nukkit.Player; import cn.nukkit.command.data.CommandParameter; -import ms.kevi.plotplugin.PlotPlugin; -import ms.kevi.plotplugin.lang.TranslationKey; import lombok.AccessLevel; import lombok.Getter; import lombok.Setter; +import ms.kevi.plotplugin.PlotPlugin; +import ms.kevi.plotplugin.lang.TranslationKey; import java.util.*; diff --git a/src/main/java/ms/kevi/plotplugin/command/defaults/AutoCommand.java b/src/main/java/ms/kevi/plotplugin/command/defaults/AutoCommand.java index 6eedf0e..8aaee17 100644 --- a/src/main/java/ms/kevi/plotplugin/command/defaults/AutoCommand.java +++ b/src/main/java/ms/kevi/plotplugin/command/defaults/AutoCommand.java @@ -45,7 +45,7 @@ public boolean execute(Player player, String[] args) { } final int ownedPlots = plotManager.getPlotsByOwner(player.getUniqueId()).size(); - if(!player.isOp()) { + if(!player.hasPermission("plot.limit.unlimited")) { int maxLimit = -1; for(String permission : player.getEffectivePermissions().keySet()) { if(permission.startsWith("plot.limit.")) { diff --git a/src/main/java/ms/kevi/plotplugin/command/defaults/ClaimCommand.java b/src/main/java/ms/kevi/plotplugin/command/defaults/ClaimCommand.java index 2181320..c483ab6 100644 --- a/src/main/java/ms/kevi/plotplugin/command/defaults/ClaimCommand.java +++ b/src/main/java/ms/kevi/plotplugin/command/defaults/ClaimCommand.java @@ -46,7 +46,7 @@ public boolean execute(Player player, String[] args) { } final int ownedPlots = plotManager.getPlotsByOwner(player.getUniqueId()).size(); - if(!player.isOp()) { + if(!player.hasPermission("plot.limit.unlimited")) { int maxLimit = -1; for(String permission : player.getEffectivePermissions().keySet()) { if(permission.startsWith("plot.limit.")) { diff --git a/src/main/java/ms/kevi/plotplugin/command/defaults/DisposeCommand.java b/src/main/java/ms/kevi/plotplugin/command/defaults/DisposeCommand.java index 7ce5b4f..920a4c0 100644 --- a/src/main/java/ms/kevi/plotplugin/command/defaults/DisposeCommand.java +++ b/src/main/java/ms/kevi/plotplugin/command/defaults/DisposeCommand.java @@ -43,15 +43,19 @@ public boolean execute(Player player, String[] args) { return false; } - if(player.hasPermission("plot.command.admin.dispose") || plot.isOwner(player.getUniqueId())) { - plotManager.disposePlot(plot); - plotManager.savePlots(); - player.sendMessage(this.translate(player, TranslationKey.DISPOSE_SUCCESS)); - return true; - } else { + if(!plot.isOwner(player.getUniqueId()) && !player.hasPermission("plot.command.admin.dispose")) { player.sendMessage(this.translate(player, TranslationKey.DISPOSE_FAILURE)); return false; } + + if(!plotManager.disposePlot(plot)) { + player.sendMessage(this.translate(player, TranslationKey.DISPOSE_FAILURE_COULD_NOT_DISPOSE)); + return false; + } + + plotManager.savePlots(); + player.sendMessage(this.translate(player, TranslationKey.DISPOSE_SUCCESS)); + return true; } } diff --git a/src/main/java/ms/kevi/plotplugin/command/defaults/MergeCommand.java b/src/main/java/ms/kevi/plotplugin/command/defaults/MergeCommand.java index 4986763..6d730e2 100644 --- a/src/main/java/ms/kevi/plotplugin/command/defaults/MergeCommand.java +++ b/src/main/java/ms/kevi/plotplugin/command/defaults/MergeCommand.java @@ -52,64 +52,55 @@ public boolean execute(Player player, String[] args) { final int dir = (NukkitMath.floorDouble((player.getYaw() * 4 / 360) + 0.5) - 2) & 3; final Set plotsToMerge = plotManager.calculatePlotsToMerge(plot, dir); - boolean isOwner = player.hasPermission("plot.command.admin.merge"); - if(!isOwner) { - isOwner = true; + if(!player.hasPermission("plot.command.admin.merge")) { for(Plot plotToMerge : plotsToMerge) { if(!plotToMerge.isOwner(player.getUniqueId())) { - isOwner = false; - break; + player.sendMessage(this.translate(player, TranslationKey.MERGE_FAILURE_OWNER)); + return false; } } } - if(isOwner) { - if(!player.hasPermission("plot.merge.unlimited") && !player.isOp()) { - if(!player.isOp()) { - int maxLimit = -1; - for(String permission : player.getEffectivePermissions().keySet()) { - if(permission.startsWith("plot.merge.limit.")) { - try { - final String limitStr = permission.substring("plot.merge.limit.".length()); - if(limitStr.isBlank()) continue; - final int limit = Integer.parseInt(limitStr); - - if(limit > maxLimit) maxLimit = limit; - } catch(NumberFormatException ignored) { - } - } - } - - if(maxLimit > 0 && plotsToMerge.size() > maxLimit) { - player.sendMessage(this.translate(player, TranslationKey.MERGE_FAILURE_TOO_MANY, plotsToMerge.size())); - return false; + if(!player.hasPermission("plot.merge.limit.unlimited")) { + int maxLimit = -1; + for(String permission : player.getEffectivePermissions().keySet()) { + if(permission.startsWith("plot.merge.limit.")) { + try { + final String limitStr = permission.substring("plot.merge.limit.".length()); + if(limitStr.isBlank()) continue; + final int limit = Integer.parseInt(limitStr); + + if(limit > maxLimit) maxLimit = limit; + } catch(NumberFormatException ignored) { } } } - if(plot.isMerged(dir)) { - player.sendMessage(this.translate(player, TranslationKey.MERGE_FAILURE_ALREADY_MERGED)); + if(maxLimit > 0 && plotsToMerge.size() > maxLimit) { + player.sendMessage(this.translate(player, TranslationKey.MERGE_FAILURE_TOO_MANY, plotsToMerge.size())); return false; } + } - final PlotPreMergeEvent plotPreMergeEvent = new PlotPreMergeEvent(player, plot, dir, plotsToMerge); - this.plugin.getServer().getPluginManager().callEvent(plotPreMergeEvent); - if(plotPreMergeEvent.isCancelled()) return false; - - if(!plotManager.startMerge(plot, plotsToMerge)) { - player.sendMessage(this.translate(player, TranslationKey.MERGE_FAILURE_NO_PLOTS_FOUND)); - return false; - } + if(plot.isMerged(dir)) { + player.sendMessage(this.translate(player, TranslationKey.MERGE_FAILURE_ALREADY_MERGED)); + return false; + } - final PlotMergeEvent plotMergeEvent = new PlotMergeEvent(player, plot, plotsToMerge); - this.plugin.getServer().getPluginManager().callEvent(plotMergeEvent); + final PlotPreMergeEvent plotPreMergeEvent = new PlotPreMergeEvent(player, plot, dir, plotsToMerge); + this.plugin.getServer().getPluginManager().callEvent(plotPreMergeEvent); + if(plotPreMergeEvent.isCancelled()) return false; - player.sendMessage(this.translate(player, TranslationKey.MERGE_SUCCESS)); - return true; - } else { - player.sendMessage(this.translate(player, TranslationKey.MERGE_FAILURE_OWNER)); + if(!plotManager.startMerge(plot, plotsToMerge)) { + player.sendMessage(this.translate(player, TranslationKey.MERGE_FAILURE_NO_PLOTS_FOUND)); return false; } + + final PlotMergeEvent plotMergeEvent = new PlotMergeEvent(player, plot, plotsToMerge); + this.plugin.getServer().getPluginManager().callEvent(plotMergeEvent); + + player.sendMessage(this.translate(player, TranslationKey.MERGE_SUCCESS)); + return true; } } diff --git a/src/main/java/ms/kevi/plotplugin/command/defaults/SetOwnerCommand.java b/src/main/java/ms/kevi/plotplugin/command/defaults/SetOwnerCommand.java index 27f65c5..770b2a7 100644 --- a/src/main/java/ms/kevi/plotplugin/command/defaults/SetOwnerCommand.java +++ b/src/main/java/ms/kevi/plotplugin/command/defaults/SetOwnerCommand.java @@ -74,7 +74,7 @@ public boolean execute(Player player, String[] args) { } final int ownedPlots = plotManager.getPlotsByOwner(targetId).size(); - if(!target.isOp() && !player.hasPermission("plot.command.admin.setowner")) { + if(!target.hasPermission("plot.limit.unlimited") && !player.hasPermission("plot.command.admin.setowner")) { int maxLimit = -1; for(String permission : target.getEffectivePermissions().keySet()) { if(permission.startsWith("plot.limit.")) { diff --git a/src/main/java/ms/kevi/plotplugin/command/defaults/SetRoadsCommand.java b/src/main/java/ms/kevi/plotplugin/command/defaults/SetRoadsCommand.java index 6fc4452..d03c83d 100644 --- a/src/main/java/ms/kevi/plotplugin/command/defaults/SetRoadsCommand.java +++ b/src/main/java/ms/kevi/plotplugin/command/defaults/SetRoadsCommand.java @@ -75,7 +75,7 @@ public boolean execute(Player player, String[] args) { for(int y = startPos.getFloorY(); y <= endPos.getFloorY(); y++) { final Vector3 defaultBlockVector = new Vector3(x, y, z); - final Vector3 blockVector = new Vector3(x - startPos.getFloorX(), y, z - startPos.getFloorZ()); + final Vector3 blockVector = new Vector3(x - startPos.getFloorX(), y - startPos.getFloorY(), z - startPos.getFloorZ()); final BlockState blockState0 = level.getBlockStateAt(x, y, z, 0); final BlockState blockState1 = level.getBlockStateAt(x, y, z, 1); diff --git a/src/main/java/ms/kevi/plotplugin/event/PlotClaimEvent.java b/src/main/java/ms/kevi/plotplugin/event/PlotClaimEvent.java index e549eca..f0166a9 100644 --- a/src/main/java/ms/kevi/plotplugin/event/PlotClaimEvent.java +++ b/src/main/java/ms/kevi/plotplugin/event/PlotClaimEvent.java @@ -18,8 +18,8 @@ import cn.nukkit.Player; import cn.nukkit.event.HandlerList; -import ms.kevi.plotplugin.util.Plot; import lombok.Getter; +import ms.kevi.plotplugin.util.Plot; /** * @author Kevims KCodeYT diff --git a/src/main/java/ms/kevi/plotplugin/event/PlotClearEvent.java b/src/main/java/ms/kevi/plotplugin/event/PlotClearEvent.java index 68839ca..2e61c2f 100644 --- a/src/main/java/ms/kevi/plotplugin/event/PlotClearEvent.java +++ b/src/main/java/ms/kevi/plotplugin/event/PlotClearEvent.java @@ -18,8 +18,8 @@ import cn.nukkit.event.Cancellable; import cn.nukkit.event.HandlerList; -import ms.kevi.plotplugin.util.Plot; import lombok.Getter; +import ms.kevi.plotplugin.util.Plot; /** * @author Kevims KCodeYT diff --git a/src/main/java/ms/kevi/plotplugin/event/PlotEnterEvent.java b/src/main/java/ms/kevi/plotplugin/event/PlotEnterEvent.java index d3c046f..ddc9fac 100644 --- a/src/main/java/ms/kevi/plotplugin/event/PlotEnterEvent.java +++ b/src/main/java/ms/kevi/plotplugin/event/PlotEnterEvent.java @@ -19,8 +19,8 @@ import cn.nukkit.Player; import cn.nukkit.event.Cancellable; import cn.nukkit.event.HandlerList; -import ms.kevi.plotplugin.util.Plot; import lombok.Getter; +import ms.kevi.plotplugin.util.Plot; /** * @author Kevims KCodeYT diff --git a/src/main/java/ms/kevi/plotplugin/event/PlotEvent.java b/src/main/java/ms/kevi/plotplugin/event/PlotEvent.java index 0ba7af3..7d4a4fe 100644 --- a/src/main/java/ms/kevi/plotplugin/event/PlotEvent.java +++ b/src/main/java/ms/kevi/plotplugin/event/PlotEvent.java @@ -17,9 +17,9 @@ package ms.kevi.plotplugin.event; import cn.nukkit.event.Event; -import ms.kevi.plotplugin.util.Plot; import lombok.AllArgsConstructor; import lombok.Getter; +import ms.kevi.plotplugin.util.Plot; /** * @author Kevims KCodeYT diff --git a/src/main/java/ms/kevi/plotplugin/event/PlotLeaveEvent.java b/src/main/java/ms/kevi/plotplugin/event/PlotLeaveEvent.java index 6fee8c3..85d45f1 100644 --- a/src/main/java/ms/kevi/plotplugin/event/PlotLeaveEvent.java +++ b/src/main/java/ms/kevi/plotplugin/event/PlotLeaveEvent.java @@ -19,8 +19,8 @@ import cn.nukkit.Player; import cn.nukkit.event.Cancellable; import cn.nukkit.event.HandlerList; -import ms.kevi.plotplugin.util.Plot; import lombok.Getter; +import ms.kevi.plotplugin.util.Plot; /** * @author Kevims KCodeYT diff --git a/src/main/java/ms/kevi/plotplugin/event/PlotPreClaimEvent.java b/src/main/java/ms/kevi/plotplugin/event/PlotPreClaimEvent.java index a42aa30..a074366 100644 --- a/src/main/java/ms/kevi/plotplugin/event/PlotPreClaimEvent.java +++ b/src/main/java/ms/kevi/plotplugin/event/PlotPreClaimEvent.java @@ -19,10 +19,10 @@ import cn.nukkit.Player; import cn.nukkit.event.Cancellable; import cn.nukkit.event.HandlerList; -import ms.kevi.plotplugin.util.Plot; -import ms.kevi.plotplugin.util.Waiter; import lombok.Getter; import lombok.Setter; +import ms.kevi.plotplugin.util.Plot; +import ms.kevi.plotplugin.util.Waiter; /** * @author Kevims KCodeYT diff --git a/src/main/java/ms/kevi/plotplugin/event/PlotPreMergeEvent.java b/src/main/java/ms/kevi/plotplugin/event/PlotPreMergeEvent.java index 3ef7f73..f5df595 100644 --- a/src/main/java/ms/kevi/plotplugin/event/PlotPreMergeEvent.java +++ b/src/main/java/ms/kevi/plotplugin/event/PlotPreMergeEvent.java @@ -19,8 +19,8 @@ import cn.nukkit.Player; import cn.nukkit.event.Cancellable; import cn.nukkit.event.HandlerList; -import ms.kevi.plotplugin.util.Plot; import lombok.Getter; +import ms.kevi.plotplugin.util.Plot; import java.util.Set; diff --git a/src/main/java/ms/kevi/plotplugin/lang/TranslationKey.java b/src/main/java/ms/kevi/plotplugin/lang/TranslationKey.java index 34063f0..b86ddb1 100644 --- a/src/main/java/ms/kevi/plotplugin/lang/TranslationKey.java +++ b/src/main/java/ms/kevi/plotplugin/lang/TranslationKey.java @@ -51,6 +51,7 @@ public enum TranslationKey { DENY_FAILURE, DENY_SUCCESS, DISPOSE_FAILURE, + DISPOSE_FAILURE_COULD_NOT_DISPOSE, DISPOSE_SUCCESS, GENERATE_DIMENSION, GENERATE_FAILURE, diff --git a/src/main/java/ms/kevi/plotplugin/listener/PlotLevelRegistrationListener.java b/src/main/java/ms/kevi/plotplugin/listener/PlotLevelRegistrationListener.java index 45242cf..ee0fbcc 100644 --- a/src/main/java/ms/kevi/plotplugin/listener/PlotLevelRegistrationListener.java +++ b/src/main/java/ms/kevi/plotplugin/listener/PlotLevelRegistrationListener.java @@ -24,10 +24,10 @@ import cn.nukkit.event.player.PlayerChatEvent; import cn.nukkit.item.Item; import cn.nukkit.level.Level; +import lombok.RequiredArgsConstructor; import ms.kevi.plotplugin.PlotPlugin; import ms.kevi.plotplugin.lang.TranslationKey; import ms.kevi.plotplugin.util.PlotLevelRegistration; -import lombok.RequiredArgsConstructor; /** * @author Kevims KCodeYT diff --git a/src/main/java/ms/kevi/plotplugin/listener/PlotListener.java b/src/main/java/ms/kevi/plotplugin/listener/PlotListener.java index 986e21e..eec6dc7 100644 --- a/src/main/java/ms/kevi/plotplugin/listener/PlotListener.java +++ b/src/main/java/ms/kevi/plotplugin/listener/PlotListener.java @@ -29,6 +29,7 @@ import cn.nukkit.event.level.StructureGrowEvent; import cn.nukkit.event.player.*; import cn.nukkit.item.Item; +import lombok.RequiredArgsConstructor; import ms.kevi.plotplugin.PlotPlugin; import ms.kevi.plotplugin.event.PlotEnterEvent; import ms.kevi.plotplugin.event.PlotLeaveEvent; @@ -38,7 +39,6 @@ import ms.kevi.plotplugin.util.PlotConfig; import ms.kevi.plotplugin.util.ShapeType; import ms.kevi.plotplugin.util.Utils; -import lombok.RequiredArgsConstructor; import java.util.ArrayList; diff --git a/src/main/java/ms/kevi/plotplugin/manager/PlotManager.java b/src/main/java/ms/kevi/plotplugin/manager/PlotManager.java index 0eace7b..93a81ce 100644 --- a/src/main/java/ms/kevi/plotplugin/manager/PlotManager.java +++ b/src/main/java/ms/kevi/plotplugin/manager/PlotManager.java @@ -26,9 +26,7 @@ import cn.nukkit.level.Position; import cn.nukkit.level.format.FullChunk; import cn.nukkit.level.format.generic.BaseFullChunk; -import cn.nukkit.math.BlockVector3; -import cn.nukkit.math.Vector2; -import cn.nukkit.math.Vector3; +import cn.nukkit.math.*; import cn.nukkit.utils.Config; import lombok.Getter; import ms.kevi.plotplugin.PlotPlugin; @@ -252,6 +250,17 @@ public Set getConnectedPlots(Plot plot) { return tmpSet; } + public Set getDirectConnectedPlots(Plot plot) { + if(plot.hasNoMerges()) return Collections.singleton(plot); + + final Set tmpSet = new HashSet<>(Collections.singleton(plot)); + for(int iDir = 0; iDir < 4; iDir++) { + if(plot.isMerged(iDir)) tmpSet.add(this.getPlotById(plot.getRelative(iDir))); + } + + return tmpSet; + } + public Set calculatePlotsToMerge(Plot plot, int dir) { final Set plots = new LinkedHashSet<>(); plots.addAll(this.getConnectedPlots(plot)); @@ -279,11 +288,11 @@ public boolean startMerge(Plot plot, Set plots) { relativeDir = toMerge0.getRelativeDir(toMerge1.getId()); if(relativeDir != -1 && !toMerge0.isMerged(relativeDir)) - this.mergePlot(toMerge0, toMerge1, whenDone); + this.mergePlot(toMerge0, toMerge1, whenDone, false); relativeDir = toMerge1.getRelativeDir(toMerge0.getId()); if(relativeDir != -1 && !toMerge1.isMerged(relativeDir)) - this.mergePlot(toMerge1, toMerge0, whenDone); + this.mergePlot(toMerge1, toMerge0, whenDone, false); } } @@ -330,7 +339,7 @@ private void finishPlotMerge(Set plots) { } } - private void mergePlot(Plot lesserPlot, Plot greaterPlot, WhenDone whenDone) { + private void mergePlot(Plot lesserPlot, Plot greaterPlot, WhenDone whenDone, boolean force) { if(lesserPlot.getId().getX() == greaterPlot.getId().getX()) { if(lesserPlot.getId().getZ() > greaterPlot.getId().getZ()) { final Plot tmp = lesserPlot; @@ -338,9 +347,13 @@ private void mergePlot(Plot lesserPlot, Plot greaterPlot, WhenDone whenDone) { greaterPlot = tmp; } - if(!lesserPlot.isMerged(2)) { - lesserPlot.setMerged(2, true); - greaterPlot.setMerged(0, true); + final boolean first = !lesserPlot.isMerged(2); + if(first || force) { + if(first) { + lesserPlot.setMerged(2, true); + greaterPlot.setMerged(0, true); + } + this.removeRoadSouth(lesserPlot, whenDone); final Plot diagonal = this.getPlotById(greaterPlot.getRelative(1)); if(diagonal.isMerged(7)) @@ -356,9 +369,13 @@ private void mergePlot(Plot lesserPlot, Plot greaterPlot, WhenDone whenDone) { greaterPlot = tmp; } - if(!lesserPlot.isMerged(1)) { - lesserPlot.setMerged(1, true); - greaterPlot.setMerged(3, true); + final boolean first = !lesserPlot.isMerged(1); + if(first || force) { + if(first) { + lesserPlot.setMerged(1, true); + greaterPlot.setMerged(3, true); + } + final Plot diagonal = this.getPlotById(greaterPlot.getRelative(2)); if(diagonal.isMerged(7)) this.removeRoadSouthEast(lesserPlot, whenDone); @@ -384,12 +401,20 @@ private void removeRoadEast(Plot plot, WhenDone whenDone) { final int zStart = pos1.getZ() - 1; final int zEnd = pos2.getZ() + 1; - final AsyncLevelWorker asyncLevelWorker = new AsyncLevelWorker(this.level); - asyncLevelWorker.queueFill( - new BlockVector3(xStart, minY + groundHeight + 1, zStart + 1), - new BlockVector3(xEnd, maxY, zEnd - 1), - BlockState.AIR + final AxisAlignedBB bb = new SimpleAxisAlignedBB( + xStart, minY, zStart + 1, + xEnd, maxY, zEnd - 1 ); + + for(Entity entity : this.level.getCollidingEntities(bb)) + if(!(entity instanceof Player)) entity.close(); + + for(Block block : this.level.getCollisionBlocks(bb, false, true)) { + final BlockEntity blockEntity = block.getLevelBlockEntity(); + if(blockEntity != null) blockEntity.close(); + } + + final AsyncLevelWorker asyncLevelWorker = new AsyncLevelWorker(this.level); asyncLevelWorker.queueFill( new BlockVector3(xStart, minY + 1, zStart + 1), new BlockVector3(xEnd, minY + groundHeight - 1, zEnd - 1), @@ -400,6 +425,11 @@ private void removeRoadEast(Plot plot, WhenDone whenDone) { new BlockVector3(xEnd, minY + groundHeight, zEnd - 1), this.levelSettings.getLastLayerState() ); + asyncLevelWorker.queueFill( + new BlockVector3(xStart, minY + groundHeight + 1, zStart + 1), + new BlockVector3(xEnd, maxY, zEnd - 1), + BlockState.AIR + ); asyncLevelWorker.runQueue(whenDone); } @@ -417,12 +447,20 @@ private void removeRoadSouth(Plot plot, WhenDone whenDone) { final int zStart = pos2.getZ() + 1; final int zEnd = zStart + roadSize - 1; - final AsyncLevelWorker asyncLevelWorker = new AsyncLevelWorker(this.level); - asyncLevelWorker.queueFill( - new BlockVector3(xStart + 1, minY + groundHeight + 1, zStart), - new BlockVector3(xEnd - 1, maxY, zEnd), - BlockState.AIR + final AxisAlignedBB bb = new SimpleAxisAlignedBB( + xStart + 1, minY, zStart, + xEnd - 1, maxY, zEnd ); + + for(Entity entity : this.level.getCollidingEntities(bb)) + if(!(entity instanceof Player)) entity.close(); + + for(Block block : this.level.getCollisionBlocks(bb, false, true)) { + final BlockEntity blockEntity = block.getLevelBlockEntity(); + if(blockEntity != null) blockEntity.close(); + } + + final AsyncLevelWorker asyncLevelWorker = new AsyncLevelWorker(this.level); asyncLevelWorker.queueFill( new BlockVector3(xStart + 1, minY + 1, zStart), new BlockVector3(xEnd - 1, minY + groundHeight - 1, zEnd), @@ -433,6 +471,11 @@ private void removeRoadSouth(Plot plot, WhenDone whenDone) { new BlockVector3(xEnd - 1, minY + groundHeight, zEnd), this.levelSettings.getLastLayerState() ); + asyncLevelWorker.queueFill( + new BlockVector3(xStart + 1, minY + groundHeight + 1, zStart), + new BlockVector3(xEnd - 1, maxY, zEnd), + BlockState.AIR + ); asyncLevelWorker.runQueue(whenDone); } @@ -449,12 +492,20 @@ private void removeRoadSouthEast(Plot plot, WhenDone whenDone) { final int zStart = pos.getZ() + 1; final int zEnd = zStart + roadSize - 1; - final AsyncLevelWorker asyncLevelWorker = new AsyncLevelWorker(this.level); - asyncLevelWorker.queueFill( - new BlockVector3(xStart, minY + groundHeight + 1, zStart), - new BlockVector3(xEnd, maxY, zEnd), - BlockState.AIR + final AxisAlignedBB bb = new SimpleAxisAlignedBB( + xStart, minY, zStart, + xEnd, maxY, zEnd ); + + for(Entity entity : this.level.getCollidingEntities(bb)) + if(!(entity instanceof Player)) entity.close(); + + for(Block block : this.level.getCollisionBlocks(bb, false, true)) { + final BlockEntity blockEntity = block.getLevelBlockEntity(); + if(blockEntity != null) blockEntity.close(); + } + + final AsyncLevelWorker asyncLevelWorker = new AsyncLevelWorker(this.level); asyncLevelWorker.queueFill( new BlockVector3(xStart, minY + 1, zStart), new BlockVector3(xEnd, minY + groundHeight - 1, zEnd), @@ -465,28 +516,28 @@ private void removeRoadSouthEast(Plot plot, WhenDone whenDone) { new BlockVector3(xEnd, minY + groundHeight, zEnd), this.levelSettings.getLastLayerState() ); + asyncLevelWorker.queueFill( + new BlockVector3(xStart, minY + groundHeight + 1, zStart), + new BlockVector3(xEnd, maxY, zEnd), + BlockState.AIR + ); asyncLevelWorker.runQueue(whenDone); } public void unlinkPlot(Plot plot) { - this.unlinkPlot(plot, null); + this.unlinkPlot(plot, false); } - private void unlinkPlot(Plot plot, WhenDone finishDone) { - if(plot.hasNoMerges()) return; + public void unlinkPlot(Plot centerPlot, boolean onlyDirectNeighbors) { + if(centerPlot.hasNoMerges()) return; - final Set plots = this.getConnectedPlots(plot); + final Set plots = onlyDirectNeighbors ? this.getDirectConnectedPlots(centerPlot) : this.getConnectedPlots(centerPlot); final List vectors = new ArrayList<>(); for(Plot current : plots) vectors.add(current.getId()); - if(finishDone != null) finishDone.addTask(); + final WhenDone whenDone = new WhenDone(() -> this.finishPlotUnlink(vectors)); - final WhenDone whenDone = new WhenDone(() -> { - this.finishPlotUnlink(vectors); - if(finishDone != null) finishDone.done(); - }); - - for(Plot current : plots) { + for(Plot current : onlyDirectNeighbors ? Collections.singleton(centerPlot) : plots) { if(current.isMerged(1)) { this.createRoadEast(current, whenDone); if(current.isMerged(2)) { @@ -498,9 +549,20 @@ private void unlinkPlot(Plot plot, WhenDone finishDone) { this.createRoadSouth(current, whenDone); } - for(Plot current : plots) - for(int iDir = 0; iDir < 4; iDir++) - current.setMerged(iDir, false); + if(onlyDirectNeighbors) { + for(int iDir = 0; iDir < 4; iDir++) { + if(centerPlot.isMerged(iDir)) { + final Plot relativePlot = this.getPlotById(centerPlot.getRelative(iDir)); + relativePlot.setMerged(relativePlot.getRelativeDir(centerPlot.getId()), false); + centerPlot.setMerged(iDir, false); + } + } + } else { + for(Plot current : plots) + for(int iDir = 0; iDir < 4; iDir++) + current.setMerged(iDir, false); + } + whenDone.start(); } @@ -559,6 +621,19 @@ private void createRoadEast(Plot plot, WhenDone whenDone) { final int zStart = pos1.getZ() - 2; final int zEnd = pos2.getZ() + 2; + final AxisAlignedBB bb = new SimpleAxisAlignedBB( + xStart, minY, zStart + 2, + xEnd, maxY, zEnd - 1 + ); + + for(Entity entity : this.level.getCollidingEntities(bb)) + if(!(entity instanceof Player)) entity.close(); + + for(Block block : this.level.getCollisionBlocks(bb, false, true)) { + final BlockEntity blockEntity = block.getLevelBlockEntity(); + if(blockEntity != null) blockEntity.close(); + } + final AsyncLevelWorker asyncLevelWorker = new AsyncLevelWorker(this.level); asyncLevelWorker.queueFill( new BlockVector3(xStart, minY + groundHeight + 1, zStart + 2), @@ -606,6 +681,19 @@ private void createRoadSouth(Plot plot, WhenDone whenDone) { final int zStart = pos2.getZ() + 1; final int zEnd = zStart + roadSize - 1; + final AxisAlignedBB bb = new SimpleAxisAlignedBB( + xStart + 2, minY, zStart + 1, + xEnd - 1, maxY, zEnd + ); + + for(Entity entity : this.level.getCollidingEntities(bb)) + if(!(entity instanceof Player)) entity.close(); + + for(Block block : this.level.getCollisionBlocks(bb, false, true)) { + final BlockEntity blockEntity = block.getLevelBlockEntity(); + if(blockEntity != null) blockEntity.close(); + } + final AsyncLevelWorker asyncLevelWorker = new AsyncLevelWorker(this.level); asyncLevelWorker.queueFill( new BlockVector3(xStart + 2, minY + groundHeight + 1, zStart + 1), @@ -652,6 +740,19 @@ private void createRoadSouthEast(Plot plot, WhenDone whenDone) { final int zStart = pos.getZ() + 1; final int zEnd = zStart + roadSize - 1; + final AxisAlignedBB bb = new SimpleAxisAlignedBB( + xStart + 1, minY, zStart + 1, + xEnd - 1, maxY, zEnd - 1 + ); + + for(Entity entity : this.level.getCollidingEntities(bb)) + if(!(entity instanceof Player)) entity.close(); + + for(Block block : this.level.getCollisionBlocks(bb, false, true)) { + final BlockEntity blockEntity = block.getLevelBlockEntity(); + if(blockEntity != null) blockEntity.close(); + } + final AsyncLevelWorker asyncLevelWorker = new AsyncLevelWorker(this.level); asyncLevelWorker.queueFill( new BlockVector3(xStart + 1, minY + groundHeight + 1, zStart + 1), @@ -980,22 +1081,37 @@ private boolean clearPlot(Plot plot, WhenDone finishDone) { this.plugin.getServer().getPluginManager().callEvent(plotClearEvent); if(plotClearEvent.isCancelled()) return false; - final Set visited = new HashSet<>(); + final Set plots = new HashSet<>(this.getConnectedPlots(plot)); if(finishDone != null) finishDone.addTask(); final WhenDone whenDone = new WhenDone(() -> { - for(Plot visit : visited) this.finishClearPlot(visit); + for(Plot other : plots) this.finishPlotClear(other); if(finishDone != null) finishDone.done(); }); - final Set connectedPlots = this.getConnectedPlots(plot); - visited.addAll(connectedPlots); - for(Plot connectedPlot : connectedPlots) this.unlinkPlot(connectedPlot, whenDone); + int relativeDir; + for(Plot toClear0 : plots) { + for(Plot toClear1 : plots) { + if(toClear0.equals(toClear1)) continue; + + relativeDir = toClear0.getRelativeDir(toClear1.getId()); + if(relativeDir != -1 && toClear0.isMerged(relativeDir)) + this.mergePlot(toClear0, toClear1, whenDone, true); + + relativeDir = toClear1.getRelativeDir(toClear0.getId()); + if(relativeDir != -1 && toClear1.isMerged(relativeDir)) + this.mergePlot(toClear1, toClear0, whenDone, true); + } + } + whenDone.start(); return true; } - private void finishClearPlot(Plot plot) { + private void finishPlotClear(Plot plot) { + this.changeBorder(plot, plot.hasOwner() ? this.levelSettings.getClaimPlotState() : this.levelSettings.getWallPlotState()); + this.changeWall(plot, this.levelSettings.getWallFillingState()); + final Vector3 vector = this.getPosByPlot(plot); final int xMax = vector.getFloorX() + this.levelSettings.getPlotSize(); @@ -1004,7 +1120,7 @@ private void finishClearPlot(Plot plot) { final int maxY = LevelUtils.getChunkMaxY(this.levelSettings.getDimension()); TaskExecutor.executeAsync(() -> { - List fullChunks = new ArrayList<>(); + final List fullChunks = new ArrayList<>(); final Vector3 cPos = new Vector3(0, 0, 0); for(int x = vector.getFloorX(); x < xMax; ++x) { for(int z = vector.getFloorZ(); z < zMax; ++z) { @@ -1113,15 +1229,17 @@ public ShapeType[] getShapes(int x, int z) { return shapes; } - public void disposePlot(Plot plot) { + public boolean disposePlot(Plot plot) { final WhenDone whenDone = new WhenDone(() -> { - this.changeWall(plot, BlockState.of(this.levelSettings.getWallFillingBlockId(), this.levelSettings.getWallFillingBlockMeta())); - this.changeBorder(plot, BlockState.of(this.levelSettings.getWallPlotBlockId(), this.levelSettings.getWallPlotBlockMeta())); + plot.setOwner(null); + this.unlinkPlot(plot, true); this.removePlot(plot); }); - if(!this.clearPlot(plot, whenDone)) return; + if(!this.clearPlot(plot, whenDone)) return false; + whenDone.start(); + return true; } public void teleportPlayerToPlot(Player player, Plot plot) { diff --git a/src/main/java/ms/kevi/plotplugin/schematic/Schematic.java b/src/main/java/ms/kevi/plotplugin/schematic/Schematic.java index c203017..62ca779 100644 --- a/src/main/java/ms/kevi/plotplugin/schematic/Schematic.java +++ b/src/main/java/ms/kevi/plotplugin/schematic/Schematic.java @@ -25,12 +25,12 @@ import cn.nukkit.nbt.stream.NBTOutputStream; import cn.nukkit.nbt.tag.CompoundTag; import cn.nukkit.utils.BinaryStream; +import lombok.EqualsAndHashCode; +import lombok.ToString; import ms.kevi.plotplugin.PlotPlugin; import ms.kevi.plotplugin.util.Allowed; import ms.kevi.plotplugin.util.ShapeType; import ms.kevi.plotplugin.util.async.TaskHelper; -import lombok.EqualsAndHashCode; -import lombok.ToString; import java.io.*; import java.util.Arrays; diff --git a/src/main/java/ms/kevi/plotplugin/util/Plot.java b/src/main/java/ms/kevi/plotplugin/util/Plot.java index c1b99fe..c967d9c 100644 --- a/src/main/java/ms/kevi/plotplugin/util/Plot.java +++ b/src/main/java/ms/kevi/plotplugin/util/Plot.java @@ -88,11 +88,10 @@ public boolean isOwner(UUID playerId) { } public boolean addHelper(UUID playerId) { - if(!this.isHelper(playerId)) { - this.manager.getConnectedPlots(this).forEach(plot -> plot.addHelper0(playerId)); - return true; - } - return false; + if(this.isHelper(playerId)) return false; + + this.manager.getConnectedPlots(this).forEach(plot -> plot.addHelper0(playerId)); + return true; } private void addHelper0(UUID playerId) { @@ -118,11 +117,10 @@ public boolean isDenied(UUID playerId) { } public boolean denyPlayer(UUID playerId) { - if(!this.isDenied(playerId)) { - this.manager.getConnectedPlots(this).forEach(plot -> plot.denyPlayer0(playerId)); - return true; - } - return false; + if(this.isDenied(playerId)) return false; + + this.manager.getConnectedPlots(this).forEach(plot -> plot.denyPlayer0(playerId)); + return true; } private void denyPlayer0(UUID playerId) { diff --git a/src/main/java/ms/kevi/plotplugin/util/PlotConfig.java b/src/main/java/ms/kevi/plotplugin/util/PlotConfig.java index f0cfd7a..89150f3 100644 --- a/src/main/java/ms/kevi/plotplugin/util/PlotConfig.java +++ b/src/main/java/ms/kevi/plotplugin/util/PlotConfig.java @@ -16,9 +16,9 @@ package ms.kevi.plotplugin.util; -import ms.kevi.plotplugin.lang.TranslationKey; import lombok.AllArgsConstructor; import lombok.Getter; +import ms.kevi.plotplugin.lang.TranslationKey; /** * @author Kevims KCodeYT diff --git a/src/main/java/ms/kevi/plotplugin/util/PlotSchematic.java b/src/main/java/ms/kevi/plotplugin/util/PlotSchematic.java index 2844f71..a304a5c 100644 --- a/src/main/java/ms/kevi/plotplugin/util/PlotSchematic.java +++ b/src/main/java/ms/kevi/plotplugin/util/PlotSchematic.java @@ -16,9 +16,9 @@ package ms.kevi.plotplugin.util; +import lombok.Getter; import ms.kevi.plotplugin.manager.PlotManager; import ms.kevi.plotplugin.schematic.Schematic; -import lombok.Getter; import java.io.File; diff --git a/src/main/java/ms/kevi/plotplugin/util/async/AsyncLevelWorker.java b/src/main/java/ms/kevi/plotplugin/util/async/AsyncLevelWorker.java index c341f63..e37a711 100644 --- a/src/main/java/ms/kevi/plotplugin/util/async/AsyncLevelWorker.java +++ b/src/main/java/ms/kevi/plotplugin/util/async/AsyncLevelWorker.java @@ -56,7 +56,7 @@ public void queueFill(BlockVector3 startPos, BlockVector3 endPos, BlockState blo for(int y = startPos.getY(); y <= endPos.getY(); y++) { fullChunk.setBlockStateAtLayer(x & 15, y, z & 15, 0, blockState); - fullChunk.setBlockStateAtLayer(x & 15, y, z & 15, 1, blockState); + fullChunk.setBlockStateAtLayer(x & 15, y, z & 15, 1, BlockState.AIR); } } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index c21a94f..b66a0cf 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -4,6 +4,9 @@ default_lang: en_US #Plots per home page (/homes) plots_per_page: 5 +#Shows the command parameters for each sub command +show_command_params: true + #Add "other" commands like /plot border or /plot wall add_other_commands: true diff --git a/src/main/resources/lang/de_DE.txt b/src/main/resources/lang/de_DE.txt index 1b5da8c..6b2a9f9 100644 --- a/src/main/resources/lang/de_DE.txt +++ b/src/main/resources/lang/de_DE.txt @@ -33,6 +33,7 @@ deny-success=&6&lCitybuild &8&l» &r&6{0}&r&a darf nun nicht mehr dein Grundstü deny-failure=&6&lCitybuild &8&l» &r&6{0}&r&c darf bereits dein Grundstück nicht mehr betreten! dispose-success=&6&lCitybuild &8&l» &r&aDu hast erfolgreich dieses Grundstück freigegeben! dispose-failure=&6&lCitybuild &8&l» &r&cDu kannst dieses Grundstück nicht freigeben! +dispose-failure-could-not-dispose=&6&lCitybuild &8&l» &r&cDieses Grundstück konnte nicht freigegeben werden! generate-start=&6&lCitybuild &8&l» &r&aErstelle Grundstückswelt &r&6{0}&r&a! generate-dimension=&6&lCitybuild &8&l» &r&aWähle eine Dimension für die Grundstückswelt &r&7(&r&aStandard&7: &r&6{0}&r&7) generate-plot-biome=&6&lCitybuild &8&l» &r&aWähle das standard Biome für die Grundstücke &r&7(&r&aStandard&7: &r&6{0}&r&7) diff --git a/src/main/resources/lang/en_US.txt b/src/main/resources/lang/en_US.txt index a5ad543..ef214dc 100644 --- a/src/main/resources/lang/en_US.txt +++ b/src/main/resources/lang/en_US.txt @@ -35,6 +35,7 @@ deny-success=&6&lCitybuild &8&l» &r&6{0}&r&a may now no longer enter your plot! deny-failure=&6&lCitybuild &8&l» &r&6{0}&r&c already cannot enter your plot! dispose-success=&6&lCitybuild &8&l» &r&aYou have successfully disposed this plot! dispose-failure=&6&lCitybuild &8&l» &r&cYou cannot dispose this plot! +dispose-failure-could-not-dispose=&6&lCitybuild &8&l» &r&cThis plot could not be disposed! generate-start=&6&lCitybuild &8&l» &r&aCreating plot world &r&6{0}&r&a! generate-dimension=&6&lCitybuild &8&l» &r&aSelect dimension for the plot world &r&7(&r&aDefault&7: &r&6{0}&r&7) generate-plot-biome=&6&lCitybuild &8&l» &r&aSelect the default biome for the plots &r&7(&r&aDefault&7: &r&6{0}&r&7) diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 107e4d0..cd123b5 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: Plots -version: "1.1.1" +version: "1.1.2" api: [ "1.0.13" ] author: Kevims main: ms.kevi.plotplugin.PlotPlugin \ No newline at end of file