mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Remove BukkitMask
This commit is contained in:
@ -166,21 +166,6 @@ public class Fawe {
|
||||
this.timer = new FaweTimer();
|
||||
Fawe.this.IMP.setupVault();
|
||||
|
||||
File jar = MainUtil.getJarFile();
|
||||
// TODO FIXME remove extrablocks.json
|
||||
// File extraBlocks = MainUtil.copyFile(jar, "extrablocks.json", null);
|
||||
// if (extraBlocks != null && extraBlocks.exists()) {
|
||||
// TaskManager.IMP.task(() -> {
|
||||
// try {
|
||||
// BundledBlockData.getInstance().loadFromResource();
|
||||
// BundledBlockData.getInstance().add(extraBlocks.toURI().toURL(), true);
|
||||
// } catch (Throwable ignore) {
|
||||
// ignore.printStackTrace();
|
||||
// Fawe.debug("Invalid format: extrablocks.json");
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// Delayed worldedit setup
|
||||
TaskManager.IMP.later(() -> {
|
||||
try {
|
||||
@ -207,11 +192,6 @@ public class Fawe {
|
||||
this.chatManager = chatManager;
|
||||
}
|
||||
|
||||
// @Deprecated
|
||||
// public boolean isJava8() {
|
||||
// return isJava8;
|
||||
// }
|
||||
|
||||
public DefaultTransformParser getTransformParser() {
|
||||
return transformParser;
|
||||
}
|
||||
|
@ -8,24 +8,14 @@ import com.sk89q.worldedit.regions.Region;
|
||||
|
||||
public class FaweMask implements IDelegateRegion {
|
||||
private final Region region;
|
||||
private String description = null;
|
||||
|
||||
@Deprecated
|
||||
public FaweMask(final BlockVector3 pos1, final BlockVector3 pos2, final String id) {
|
||||
this(new CuboidRegion(pos1, pos2), id);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public FaweMask(final BlockVector3 pos1, final BlockVector3 pos2) {
|
||||
this(pos1, pos2, null);
|
||||
if ((pos1 == null) || (pos2 == null)) {
|
||||
throw new IllegalArgumentException("BlockVectors cannot be null!");
|
||||
}
|
||||
this(new CuboidRegion(pos1, pos2));
|
||||
}
|
||||
|
||||
public FaweMask(Region region, String id) {
|
||||
public FaweMask(Region region) {
|
||||
this.region = region;
|
||||
this.description = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -33,10 +23,6 @@ public class FaweMask implements IDelegateRegion {
|
||||
return region;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
public boolean isValid(FawePlayer player, FaweMaskManager.MaskType type) {
|
||||
return false;
|
||||
}
|
||||
@ -45,4 +31,4 @@ public class FaweMask implements IDelegateRegion {
|
||||
public Region clone() {
|
||||
throw new UnsupportedOperationException("Clone not supported");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ public class PlotSquaredFeature extends FaweMaskManager {
|
||||
};
|
||||
}
|
||||
|
||||
return new FaweMask(maskedRegion, "PLOT^2") {
|
||||
return new FaweMask(maskedRegion) {
|
||||
@Override
|
||||
public boolean isValid(FawePlayer player, MaskType type) {
|
||||
if (Settings.Done.RESTRICT_BUILDING && Flags.DONE.isSet(finalPlot)) {
|
||||
|
@ -1,21 +1,21 @@
|
||||
package com.sk89q.worldedit.regions;
|
||||
|
||||
import com.sk89q.worldedit.*;
|
||||
import com.sk89q.worldedit.math.BlockVector2;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.math.Vector2;
|
||||
import com.sk89q.worldedit.math.Vector3;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public interface IDelegateRegion extends Region {
|
||||
|
||||
public Region getRegion();
|
||||
Region getRegion();
|
||||
|
||||
@Override
|
||||
@NotNull @Override
|
||||
default Iterator<BlockVector3> iterator() {
|
||||
return getRegion().iterator();
|
||||
}
|
||||
|
@ -61,28 +61,28 @@ public interface Region extends Iterable<BlockVector3>, Cloneable {
|
||||
*
|
||||
* @return number of blocks
|
||||
*/
|
||||
public int getArea();
|
||||
int getArea();
|
||||
|
||||
/**
|
||||
* Get X-size.
|
||||
*
|
||||
* @return width
|
||||
*/
|
||||
public int getWidth();
|
||||
int getWidth();
|
||||
|
||||
/**
|
||||
* Get Y-size.
|
||||
*
|
||||
* @return height
|
||||
*/
|
||||
public int getHeight();
|
||||
int getHeight();
|
||||
|
||||
/**
|
||||
* Get Z-size.
|
||||
*
|
||||
* @return length
|
||||
*/
|
||||
public int getLength();
|
||||
int getLength();
|
||||
|
||||
/**
|
||||
* Expand the region.
|
||||
@ -121,12 +121,7 @@ public interface Region extends Iterable<BlockVector3>, Cloneable {
|
||||
BlockVector3 pos2 = getMaximumPoint();
|
||||
return pos1.getBlockX() == Integer.MIN_VALUE && pos1.getBlockZ() == Integer.MIN_VALUE && pos2.getBlockX() == Integer.MAX_VALUE && pos2.getBlockZ() == Integer.MAX_VALUE && pos1.getBlockY() <= 0 && pos2.getBlockY() >= 255;
|
||||
}
|
||||
/**
|
||||
* Returns true based on whether the region contains the point.
|
||||
*
|
||||
* @param position the position
|
||||
* @return true if contained
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns true based on whether the region contains the point.
|
||||
*
|
||||
@ -154,22 +149,21 @@ public interface Region extends Iterable<BlockVector3>, Cloneable {
|
||||
*
|
||||
* @return the world, or null
|
||||
*/
|
||||
@Nullable
|
||||
public World getWorld();
|
||||
@Nullable World getWorld();
|
||||
|
||||
/**
|
||||
* Sets the world that the selection is in.
|
||||
*
|
||||
* @param world the world, which may be null
|
||||
*/
|
||||
public void setWorld(@Nullable World world);
|
||||
void setWorld(@Nullable World world);
|
||||
|
||||
/**
|
||||
* Make a clone of the region.
|
||||
*
|
||||
* @return a cloned version
|
||||
*/
|
||||
public Region clone();
|
||||
Region clone();
|
||||
|
||||
/**
|
||||
* Polygonizes a cross-section or a 2D projection of the region orthogonal to the Y axis.
|
||||
|
Reference in New Issue
Block a user