diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java b/Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java index 04c41d701..48c9fed09 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java @@ -72,10 +72,34 @@ public class BukkitPlayer extends PlotPlayer { * @param player Bukkit player instance * @param permissionHandler PermissionHandler instance */ +<<<<<<< HEAD BukkitPlayer( final @NonNull PlotAreaManager plotAreaManager, final @NonNull EventDispatcher eventDispatcher, final @NonNull Player player, +======= + @Deprecated(forRemoval = true, since = "6.10.9") + public BukkitPlayer( + final @NonNull PlotAreaManager plotAreaManager, final @NonNull EventDispatcher eventDispatcher, + final @NonNull Player player, final @NonNull PermissionHandler permissionHandler + ) { + this(plotAreaManager, eventDispatcher, player, false, permissionHandler); + } + + /** + * @param plotAreaManager PlotAreaManager instance + * @param eventDispatcher EventDispatcher instance + * @param player Bukkit player instance + * @param permissionHandler PermissionHandler instance + * + * @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") + public BukkitPlayer( + final @NonNull PlotAreaManager plotAreaManager, final @NonNull + EventDispatcher eventDispatcher, final @NonNull Player player, +>>>>>>> v6 final boolean realPlayer, final @NonNull PermissionHandler permissionHandler ) { diff --git a/Core/src/main/java/com/plotsquared/core/command/Area.java b/Core/src/main/java/com/plotsquared/core/command/Area.java index f9cf3643c..5897322b2 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Area.java +++ b/Core/src/main/java/com/plotsquared/core/command/Area.java @@ -55,6 +55,7 @@ import com.plotsquared.core.util.TabCompletions; import com.plotsquared.core.util.WorldUtil; import com.plotsquared.core.util.task.RunnableVal3; import com.sk89q.worldedit.EditSession; +import com.sk89q.worldedit.EditSessionBuilder; import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.entity.Player; @@ -232,10 +233,9 @@ public class Area extends SubCommand { try (final ClipboardWriter clipboardWriter = BuiltInClipboardFormat.SPONGE_SCHEMATIC.getWriter(new FileOutputStream( file))) { final BlockArrayClipboard clipboard = new BlockArrayClipboard(selectedRegion); - final EditSession editSession = WorldEdit - .getInstance() - .getEditSessionFactory() - .getEditSession(selectedRegion.getWorld(), -1); + 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); diff --git a/Core/src/main/java/com/plotsquared/core/components/ComponentPreset.java b/Core/src/main/java/com/plotsquared/core/components/ComponentPreset.java index 5f6a37d44..cb1e989c4 100644 --- a/Core/src/main/java/com/plotsquared/core/components/ComponentPreset.java +++ b/Core/src/main/java/com/plotsquared/core/components/ComponentPreset.java @@ -62,7 +62,7 @@ public class ComponentPreset implements ConfigurationSerializable { public static ComponentPreset deserialize(final @NonNull Map map) { final ClassicPlotManagerComponent classicPlotManagerComponent = ClassicPlotManagerComponent .fromString(map.getOrDefault("component", "").toString()).orElseThrow(() -> - new IllegalArgumentException("The preset needs a valid target component")); + new IllegalArgumentException("The preset in components.yml needs a valid target component, got: " + map.get("component"))); final String pattern = map.getOrDefault("pattern", "").toString(); final double cost = Double.parseDouble(map.getOrDefault("cost", "0.0").toString()); final String permission = map.getOrDefault("permission", "").toString(); diff --git a/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java b/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java index e8a7e3168..ed764444d 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java @@ -336,7 +336,7 @@ public final class PlotModificationManager { * @param createSign whether to recreate signs * @param whenDone Task to run when unlink is complete * @return success/!cancelled - * @since TODO + * @since 6.10.9 */ public boolean unlinkPlot(final boolean createRoad, final boolean createSign, final Runnable whenDone) { if (!this.plot.isMerged()) {