mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:28:35 +00:00
More code quality fixes
This commit is contained in:
@ -54,6 +54,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
*/
|
||||
public class BlockArrayClipboard extends DelegateClipboard implements Clipboard, Closeable {
|
||||
|
||||
@NotNull
|
||||
private Region region;
|
||||
private BlockVector3 offset;
|
||||
|
||||
@ -85,6 +86,7 @@ public class BlockArrayClipboard extends DelegateClipboard implements Clipboard,
|
||||
setRegion(region);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Region getRegion() {
|
||||
return region;
|
||||
|
@ -77,12 +77,17 @@ public interface Clipboard extends Extent, Iterable<BlockVector3>, Closeable {
|
||||
|
||||
static Clipboard create(BlockVector3 size, UUID uuid) {
|
||||
if (Settings.IMP.CLIPBOARD.USE_DISK) {
|
||||
return new DiskOptimizedClipboard(size, uuid);
|
||||
try {
|
||||
return new DiskOptimizedClipboard(size, uuid);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL == 0) {
|
||||
return new CPUOptimizedClipboard(size);
|
||||
} else {
|
||||
return new MemoryOptimizedClipboard(size);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -116,11 +121,10 @@ public interface Clipboard extends Extent, Iterable<BlockVector3>, Closeable {
|
||||
void setOrigin(BlockVector3 origin);
|
||||
|
||||
/**
|
||||
* Returns true if the clipboard has biome data. This can be checked since {@link
|
||||
* Extent#getBiome(BlockVector2)} strongly suggests returning {@link
|
||||
* com.sk89q.worldedit.world.biome.BiomeTypes#OCEAN} instead of {@code null} if biomes aren't
|
||||
* present. However, it might not be desired to set areas to ocean if the clipboard is
|
||||
* defaulting to ocean, instead of having biomes explicitly set.
|
||||
* Returns true if the clipboard has biome data. This can be checked since {@link Extent#getBiome(BlockVector2)}
|
||||
* strongly suggests returning {@link com.sk89q.worldedit.world.biome.BiomeTypes#OCEAN} instead of {@code null}
|
||||
* if biomes aren't present. However, it might not be desired to set areas to ocean if the clipboard is defaulting
|
||||
* to ocean, instead of having biomes explicitly set.
|
||||
*
|
||||
* @return true if the clipboard has biome data set
|
||||
*/
|
||||
|
Reference in New Issue
Block a user