Compare commits

..

1 Commits

Author SHA1 Message Date
8b41342508 Minor cleanup of the plot analyze code
- No need to wrap the final analysis into another async method. It's already contained in an async task
 - Don't overstretch a chunk bounday when setting blocks to newBlocks array
2022-06-22 14:02:48 +01:00
5 changed files with 8 additions and 12 deletions

View File

@ -462,7 +462,6 @@ public final class FlagCommand extends Command {
return;
}
final Plot plot = player.getLocation().getPlotAbs();
final PlotFlag<?, ?> flagWithOldValue = plot.getFlagContainer().getFlag(flag.getClass());
PlotFlagRemoveEvent event = eventDispatcher.callFlagRemove(flag, plot);
if (event.getEventResult() == Result.DENY) {
player.sendMessage(
@ -507,7 +506,7 @@ public final class FlagCommand extends Command {
if (plot.removeFlag(flag)) {
player.sendMessage(TranslatableCaption.of("flag.flag_removed"), Template.of("flag", args[0]), Template.of(
"value",
String.valueOf(flagWithOldValue)
String.valueOf(flag)
));
return;
} else {
@ -545,7 +544,7 @@ public final class FlagCommand extends Command {
}
player.sendMessage(TranslatableCaption.of("flag.flag_removed"), Template.of("flag", args[0]), Template.of(
"value",
String.valueOf(flagWithOldValue)
String.valueOf(flag)
));
}

View File

@ -21,7 +21,6 @@ package com.plotsquared.core.generator;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import com.intellectualsites.annotations.DoNotUse;
import com.intellectualsites.annotations.NotPublic;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.ConfigurationSection;
import com.plotsquared.core.configuration.Settings;
@ -481,8 +480,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
/**
* @deprecated This method should not be available for public API usage and will be made private.
*/
@Deprecated(since = "6.9.1")
@NotPublic
@Deprecated(forRemoval = true, since = "TODO")
public void addOverlayBlock(short x, short y, short z, BaseBlock id, boolean rotate, int height) {
if (z < 0) {
z += this.SIZE;
@ -512,8 +510,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
/**
* @deprecated This method should not be available for public API usage and will be made private.
*/
@Deprecated(since = "6.9.1")
@NotPublic
@Deprecated(forRemoval = true, since = "TODO")
public void addOverlayBiome(short x, short z, BiomeType id) {
if (z < 0) {
z += this.SIZE;

View File

@ -313,7 +313,7 @@ public sealed class Location extends BlockLoc implements Comparable<Location> pe
/**
* Get the absolute {@link Plot}, if any, that contains this location
*
* @return (Absolute) plot containing the location, or {@code null}
* @return (Absolute) plot containing the location, or {code null}
*/
public @Nullable Plot getPlotAbs() {
final PlotArea area = this.getPlotArea();
@ -327,7 +327,7 @@ public sealed class Location extends BlockLoc implements Comparable<Location> pe
/**
* Get the {@link Plot}, if any, that contains this location
*
* @return plot containing the location, or {@code null}
* @return plot containing the location, or {code null}
*/
public @Nullable Plot getPlot() {
final PlotArea area = this.getPlotArea();

View File

@ -643,7 +643,7 @@ public abstract class PlotArea {
* @param player Player to check
* @param y y height to check
* @return true if outside build area with no permissions
* @since 6.9.1
* @since TODO
*/
public boolean notifyIfOutsideBuildArea(PlotPlayer<?> player, int y) {
if (!buildRangeContainsY(y) && !Permissions.hasPermission(player, Permission.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) {

View File

@ -19,7 +19,7 @@ plugins {
}
group = "com.plotsquared"
version = "6.9.1"
version = "6.9.1-SNAPSHOT"
subprojects {
group = rootProject.group