mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-24 06:06:45 +01:00
PS-3908: Cleanup deprecated methods to improve code maturity. (#3944)
https://github.com/IntellectualSites/PlotSquared/issues/3908
This commit is contained in:
parent
0558fcf5d5
commit
0dd8b1053c
@ -56,6 +56,7 @@ import com.plotsquared.core.util.TabCompletions;
|
|||||||
import com.plotsquared.core.util.WorldUtil;
|
import com.plotsquared.core.util.WorldUtil;
|
||||||
import com.plotsquared.core.util.task.RunnableVal3;
|
import com.plotsquared.core.util.task.RunnableVal3;
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
|
import com.sk89q.worldedit.EditSessionBuilder;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
@ -228,12 +229,14 @@ public class Area extends SubCommand {
|
|||||||
try (final ClipboardWriter clipboardWriter = BuiltInClipboardFormat.SPONGE_SCHEMATIC.getWriter(new FileOutputStream(
|
try (final ClipboardWriter clipboardWriter = BuiltInClipboardFormat.SPONGE_SCHEMATIC.getWriter(new FileOutputStream(
|
||||||
file))) {
|
file))) {
|
||||||
final BlockArrayClipboard clipboard = new BlockArrayClipboard(selectedRegion);
|
final BlockArrayClipboard clipboard = new BlockArrayClipboard(selectedRegion);
|
||||||
final EditSession editSession = WorldEdit
|
|
||||||
.getInstance()
|
EditSessionBuilder editSessionBuilder = WorldEdit.getInstance().newEditSessionBuilder();
|
||||||
.getEditSessionFactory()
|
editSessionBuilder.world(selectedRegion.getWorld());
|
||||||
.getEditSession(selectedRegion.getWorld(), -1);
|
final EditSession editSession = editSessionBuilder.build();
|
||||||
|
|
||||||
final ForwardExtentCopy forwardExtentCopy =
|
final ForwardExtentCopy forwardExtentCopy =
|
||||||
new ForwardExtentCopy(editSession, selectedRegion, clipboard, selectedRegion.getMinimumPoint());
|
new ForwardExtentCopy(editSession, selectedRegion, clipboard, selectedRegion.getMinimumPoint());
|
||||||
|
|
||||||
forwardExtentCopy.setCopyingBiomes(true);
|
forwardExtentCopy.setCopyingBiomes(true);
|
||||||
forwardExtentCopy.setCopyingEntities(true);
|
forwardExtentCopy.setCopyingEntities(true);
|
||||||
Operations.complete(forwardExtentCopy);
|
Operations.complete(forwardExtentCopy);
|
||||||
|
@ -204,7 +204,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
}
|
}
|
||||||
Object value;
|
Object value;
|
||||||
try {
|
try {
|
||||||
final boolean accessible = field.isAccessible();
|
final boolean accessible = field.canAccess(field);
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
value = field.get(this);
|
value = field.get(this);
|
||||||
field.setAccessible(accessible);
|
field.setAccessible(accessible);
|
||||||
|
Loading…
Reference in New Issue
Block a user