Compare commits

..

1 Commits

Author SHA1 Message Date
dbd900f8c3 Don't fire 'PlotUnlinkEvent' twice on plot clear 2023-01-22 10:32:24 +01:00
6 changed files with 8 additions and 6 deletions

View File

@ -75,7 +75,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
* @deprecated Please do not use this method. Instead use {@link BukkitUtil#adapt(Player)}, as it caches player objects.
* This method will be made private in a future release.
*/
@Deprecated(forRemoval = true, since = "6.10.9")
@Deprecated(forRemoval = true, since = "TODO")
public BukkitPlayer(
final @NonNull PlotAreaManager plotAreaManager, final @NonNull EventDispatcher eventDispatcher,
final @NonNull Player player, final @NonNull PermissionHandler permissionHandler
@ -92,7 +92,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
* @deprecated Please do not use this method. Instead use {@link BukkitUtil#adapt(Player)}, as it caches player objects.
* This method will be made private in a future release.
*/
@Deprecated(forRemoval = true, since = "6.10.9")
@Deprecated(forRemoval = true, since = "TODO")
public BukkitPlayer(
final @NonNull PlotAreaManager plotAreaManager, final @NonNull
EventDispatcher eventDispatcher, final @NonNull Player player,

View File

@ -229,11 +229,14 @@ public class Area extends SubCommand {
try (final ClipboardWriter clipboardWriter = BuiltInClipboardFormat.SPONGE_SCHEMATIC.getWriter(new FileOutputStream(
file))) {
final BlockArrayClipboard clipboard = new BlockArrayClipboard(selectedRegion);
EditSessionBuilder editSessionBuilder = WorldEdit.getInstance().newEditSessionBuilder();
editSessionBuilder.world(selectedRegion.getWorld());
final EditSession editSession = editSessionBuilder.build();
final ForwardExtentCopy forwardExtentCopy =
new ForwardExtentCopy(editSession, selectedRegion, clipboard, selectedRegion.getMinimumPoint());
forwardExtentCopy.setCopyingBiomes(true);
forwardExtentCopy.setCopyingEntities(true);
Operations.complete(forwardExtentCopy);

View File

@ -106,7 +106,6 @@ public class Clear extends Command {
BackupManager.backup(player, plot, () -> {
final long start = System.currentTimeMillis();
boolean result = plot.getPlotModificationManager().clear(true, false, player, () -> {
plot.getPlotModificationManager().unlink();
TaskManager.runTask(() -> {
plot.removeRunning();
// If the state changes, then mark it as no longer done

View File

@ -204,7 +204,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
}
Object value;
try {
final boolean accessible = field.isAccessible();
final boolean accessible = field.canAccess(field);
field.setAccessible(true);
value = field.get(this);
field.setAccessible(accessible);

View File

@ -334,7 +334,7 @@ public final class PlotModificationManager {
* @param createSign whether to recreate signs
* @param whenDone Task to run when unlink is complete
* @return success/!cancelled
* @since 6.10.9
* @since TODO
*/
public boolean unlinkPlot(final boolean createRoad, final boolean createSign, final Runnable whenDone) {
if (!this.plot.isMerged()) {

View File

@ -18,7 +18,7 @@ plugins {
}
group = "com.plotsquared"
version = "6.10.9"
version = "6.10.9-SNAPSHOT"
if (!File("$rootDir/.git").exists()) {
logger.lifecycle("""