mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Part 1 of upstream merge and format
This commit is contained in:
@ -65,8 +65,7 @@ public abstract class AbstractNonPlayerActor implements Actor {
|
||||
|
||||
// Queue for async tasks
|
||||
private AtomicInteger runningCount = new AtomicInteger();
|
||||
private AsyncNotifyQueue asyncNotifyQueue = new AsyncNotifyQueue(
|
||||
(thread, throwable) -> {
|
||||
private AsyncNotifyQueue asyncNotifyQueue = new AsyncNotifyQueue((thread, throwable) -> {
|
||||
while (throwable.getCause() != null) {
|
||||
throwable = throwable.getCause();
|
||||
}
|
||||
@ -83,11 +82,11 @@ public abstract class AbstractNonPlayerActor implements Actor {
|
||||
});
|
||||
|
||||
/**
|
||||
* Run a task either async, or on the current thread
|
||||
* Run a task either async, or on the current thread.
|
||||
*
|
||||
* @param ifFree
|
||||
* @param ifFree the task to run if free
|
||||
* @param checkFree Whether to first check if a task is running
|
||||
* @param async
|
||||
* @param async TODO Description
|
||||
* @return false if the task was ran or queued
|
||||
*/
|
||||
@Override
|
||||
|
@ -19,14 +19,12 @@
|
||||
|
||||
package com.sk89q.worldedit.extension.platform;
|
||||
|
||||
import com.boydti.fawe.object.task.AsyncNotifyQueue;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
|
||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||
import com.boydti.fawe.object.exception.FaweException;
|
||||
import com.boydti.fawe.object.task.AsyncNotifyQueue;
|
||||
import com.boydti.fawe.regions.FaweMaskManager;
|
||||
import com.boydti.fawe.util.TaskManager;
|
||||
import com.boydti.fawe.util.WEManager;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
@ -43,8 +41,6 @@ import com.sk89q.worldedit.regions.Polygonal2DRegion;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.regions.RegionSelector;
|
||||
import com.sk89q.worldedit.regions.selector.ConvexPolyhedralRegionSelector;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import com.sk89q.worldedit.regions.selector.CuboidRegionSelector;
|
||||
import com.sk89q.worldedit.regions.selector.CylinderRegionSelector;
|
||||
import com.sk89q.worldedit.regions.selector.Polygonal2DRegionSelector;
|
||||
@ -53,8 +49,10 @@ import com.sk89q.worldedit.util.HandSide;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
import com.sk89q.worldedit.util.TargetBlock;
|
||||
import com.sk89q.worldedit.util.auth.AuthorizationException;
|
||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockCategories;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
@ -70,7 +68,6 @@ import java.io.File;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
@ -153,29 +150,32 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
public boolean isHoldingPickAxe() {
|
||||
ItemType item = getItemInHand(HandSide.MAIN_HAND).getType();
|
||||
return item == ItemTypes.IRON_PICKAXE
|
||||
|| item == ItemTypes.WOODEN_PICKAXE
|
||||
|| item == ItemTypes.STONE_PICKAXE
|
||||
|| item == ItemTypes.DIAMOND_PICKAXE
|
||||
|| item == ItemTypes.GOLDEN_PICKAXE;
|
||||
|| item == ItemTypes.WOODEN_PICKAXE
|
||||
|| item == ItemTypes.STONE_PICKAXE
|
||||
|| item == ItemTypes.DIAMOND_PICKAXE
|
||||
|| item == ItemTypes.GOLDEN_PICKAXE
|
||||
|| item == ItemTypes.NETHERITE_PICKAXE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void findFreePosition(Location searchPos) {
|
||||
Extent world = searchPos.getExtent();
|
||||
int x = searchPos.getBlockX();
|
||||
int y = Math.max(0, searchPos.getBlockY());
|
||||
int origY = y;
|
||||
int yPlusSearchHeight = y + WorldEdit.getInstance().getConfiguration().defaultVerticalHeight;
|
||||
int z = searchPos.getBlockZ();
|
||||
int maxY = Math.min(255, yPlusSearchHeight) + 2;
|
||||
|
||||
int worldMinY = world.getMinimumPoint().getY();
|
||||
int worldMaxY = world.getMaximumPoint().getY();
|
||||
|
||||
int x = searchPos.getBlockX();
|
||||
int y = Math.max(worldMinY, searchPos.getBlockY());
|
||||
int origY = y;
|
||||
int z = searchPos.getBlockZ();
|
||||
int yPlusSearchHeight = y + WorldEdit.getInstance().getConfiguration().defaultVerticalHeight;
|
||||
int maxY = Math.min(worldMaxY, yPlusSearchHeight) + 2;
|
||||
|
||||
byte free = 0;
|
||||
|
||||
BlockVector3 mutablePos = MutableBlockVector3.ZERO;
|
||||
while (y <= maxY) {
|
||||
if (!world.getBlock(mutablePos.setComponents(x, y, z)).getBlockType().getMaterial()
|
||||
.isMovementBlocker()) {
|
||||
if (!world.getBlock(mutablePos.setComponents(x, y, z)).getBlockType().getMaterial().isMovementBlocker()) {
|
||||
++free;
|
||||
} else {
|
||||
free = 0;
|
||||
@ -200,15 +200,20 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
@Override
|
||||
public void setOnGround(Location searchPos) {
|
||||
Extent world = searchPos.getExtent();
|
||||
int x = searchPos.getBlockX();
|
||||
int y = Math.max(0, searchPos.getBlockY());
|
||||
int z = searchPos.getBlockZ();
|
||||
|
||||
while (y >= 0) {
|
||||
int worldMinY = world.getMinimumPoint().getY();
|
||||
|
||||
int x = searchPos.getBlockX();
|
||||
int y = Math.max(worldMinY, searchPos.getBlockY());
|
||||
int z = searchPos.getBlockZ();
|
||||
int yLessSearchHeight = y - WorldEdit.getInstance().getConfiguration().defaultVerticalHeight;
|
||||
int minY = Math.min(worldMinY, yLessSearchHeight) + 2;
|
||||
|
||||
while (y >= minY) {
|
||||
final BlockVector3 pos = BlockVector3.at(x, y, z);
|
||||
final BlockState id = world.getBlock(pos);
|
||||
if (id.getBlockType().getMaterial().isMovementBlocker()
|
||||
&& trySetPosition(Vector3.at(x + 0.5, y + +BlockTypeUtil.centralTopLimit(id), z + 0.5))) {
|
||||
&& trySetPosition(Vector3.at(x + 0.5, y + 1, z + 0.5))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -221,20 +226,27 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
findFreePosition(getBlockLocation());
|
||||
}
|
||||
|
||||
private boolean isBadSpaceForStanding(BlockVector3 location) {
|
||||
/**
|
||||
* Determines if the block at the given location "harms" the player, either by suffocation
|
||||
* or other means.
|
||||
*/
|
||||
private boolean isPlayerHarmingBlock(BlockVector3 location) {
|
||||
BlockType type = getWorld().getBlock(location).getBlockType();
|
||||
return type.getMaterial().isMovementBlocker() || type == BlockTypes.LAVA;
|
||||
return type.getMaterial().isMovementBlocker() || type == BlockTypes.LAVA
|
||||
|| BlockCategories.FIRE.contains(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the location is a good place to leave a standing player.
|
||||
*
|
||||
* @param location where the player would be placed (not Y offset)
|
||||
* @return if the player can stand at the location
|
||||
*/
|
||||
private boolean isLocationGoodForStanding(BlockVector3 location) {
|
||||
if (isBadSpaceForStanding(location.add(0, 1, 0))) {
|
||||
if (isPlayerHarmingBlock(location.add(0, 1, 0))) {
|
||||
return false;
|
||||
}
|
||||
if (isBadSpaceForStanding(location)) {
|
||||
if (isPlayerHarmingBlock(location)) {
|
||||
return false;
|
||||
}
|
||||
return getWorld().getBlock(location.add(0, -1, 0)).getBlockType().getMaterial()
|
||||
@ -275,7 +287,7 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
if (!lastState) {
|
||||
lastState = BlockTypeUtil.centralBottomLimit(state) != 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (freeStart == -1) {
|
||||
freeStart = level + BlockTypeUtil.centralTopLimit(state);
|
||||
} else {
|
||||
@ -283,13 +295,13 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
double space = level + bottomLimit - freeStart;
|
||||
if (space >= height) {
|
||||
trySetPosition(Vector3.at(x + 0.5, freeStart, z + 0.5));
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// Not enough room, reset the free position
|
||||
if (bottomLimit != 1) {
|
||||
freeStart = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
freeStart = -1;
|
||||
lastState = true;
|
||||
@ -341,8 +353,8 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
double space = freeEnd - freeStart;
|
||||
if (space >= height) {
|
||||
trySetPosition(Vector3.at(x + 0.5, freeStart, z + 0.5));
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// Not enough room, reset the free position
|
||||
if (topLimit != 0) {
|
||||
freeEnd = -1;
|
||||
@ -378,8 +390,7 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
|
||||
while (y <= world.getMaximumPoint().getY()) {
|
||||
// Found a ceiling!
|
||||
if (world.getBlock(BlockVector3.at(x, y, z)).getBlockType().getMaterial()
|
||||
.isMovementBlocker()) {
|
||||
if (world.getBlock(BlockVector3.at(x, y, z)).getBlockType().getMaterial().isMovementBlocker()) {
|
||||
int platformY = Math.max(initialY, y - 3 - clearance);
|
||||
if (platformY < initialY) { // if ==, they already have the given clearance, if <, clearance is too large
|
||||
return false;
|
||||
@ -403,17 +414,16 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
|
||||
@Override
|
||||
public boolean ascendUpwards(int distance, boolean alwaysGlass) {
|
||||
final World world = getWorld();
|
||||
final Location pos = getBlockLocation();
|
||||
final int x = pos.getBlockX();
|
||||
final int initialY = Math.max(0, pos.getBlockY());
|
||||
int y = Math.max(0, pos.getBlockY() + 1);
|
||||
final int z = pos.getBlockZ();
|
||||
final int maxY = Math.min(getWorld().getMaxY() + 1, initialY + distance);
|
||||
final Extent world = getLocation().getExtent();
|
||||
final int maxY = Math.min(world.getMaxY() + 1, initialY + distance);
|
||||
|
||||
while (y <= world.getMaximumPoint().getY() + 2) {
|
||||
if (world.getBlock(BlockVector3.at(x, y, z)).getBlockType().getMaterial()
|
||||
.isMovementBlocker()) {
|
||||
while (y <= world.getMaxY() + 2) {
|
||||
if (world.getBlock(BlockVector3.at(x, y, z)).getBlockType().getMaterial().isMovementBlocker()) {
|
||||
break; // Hit something
|
||||
} else if (y > maxY + 1) {
|
||||
break;
|
||||
@ -437,12 +447,12 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
try (EditSession session = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, 1, this)) {
|
||||
session.setBlock(spot, BlockTypes.GLASS.getDefaultState());
|
||||
} catch (MaxChangedBlocksException ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
setFlying(true);
|
||||
}
|
||||
setPosition(Vector3.at(x + 0.5, y, z + 0.5));
|
||||
trySetPosition(Vector3.at(x + 0.5, y, z + 0.5));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -501,7 +511,6 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
return getBlockTrace(range, false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Location getSolidBlockTrace(int range) {
|
||||
TargetBlock tb = new TargetBlock(this, range, 0.2);
|
||||
@ -538,9 +547,6 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
return typeId.getBlockType().getDefaultState().toBaseBlock();
|
||||
} else {
|
||||
return BlockTypes.AIR.getDefaultState().toBaseBlock(); // FAWE returns air here
|
||||
/*
|
||||
throw new NotABlockException();
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@ -551,7 +557,8 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Advances the block target block until the current block is a wall
|
||||
* Advances the block target block until the current block is a wall.
|
||||
*
|
||||
* @return true if a wall is found
|
||||
*/
|
||||
private boolean advanceToWall(TargetBlock hitBlox) {
|
||||
@ -568,7 +575,8 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Advances the block target block until the current block is a free
|
||||
* Advances the block target block until the current block is a free spot.
|
||||
*
|
||||
* @return true if a free spot is found
|
||||
*/
|
||||
private boolean advanceToFree(TargetBlock hitBlox) {
|
||||
@ -583,23 +591,24 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean passThroughForwardWall(int range) {
|
||||
TargetBlock hitBlox = new TargetBlock(this, range, 0.2);
|
||||
|
||||
if (!advanceToWall(hitBlox)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!advanceToFree(hitBlox)) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Location foundBlock = hitBlox.getCurrentBlock();
|
||||
if (foundBlock != null) {
|
||||
setOnGround(foundBlock);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -683,11 +692,11 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Run a task either async, or on the current thread
|
||||
* Run a task either async, or on the current thread.
|
||||
*
|
||||
* @param ifFree
|
||||
* @param ifFree the task to run if free
|
||||
* @param checkFree Whether to first check if a task is running
|
||||
* @param async
|
||||
* @param async TODO description
|
||||
* @return false if the task was ran or queued
|
||||
*/
|
||||
public boolean runAction(Runnable ifFree, boolean checkFree, boolean async) {
|
||||
@ -714,7 +723,7 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
|
||||
|
||||
/**
|
||||
* Get the player's current allowed WorldEdit regions
|
||||
* Get the player's current allowed WorldEdit regions.
|
||||
*
|
||||
* @return an array of allowed regions
|
||||
*/
|
||||
@ -727,7 +736,7 @@ public abstract class AbstractPlayerActor implements Actor, Player, Cloneable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the largest region in the player's allowed WorldEdit region
|
||||
* Get the largest region in the player's allowed WorldEdit region.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -20,8 +20,6 @@
|
||||
package com.sk89q.worldedit.extension.platform;
|
||||
|
||||
import com.boydti.fawe.Fawe;
|
||||
import com.sk89q.worldedit.util.formatting.text.TextComponent;
|
||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||
import com.boydti.fawe.config.Settings;
|
||||
import com.boydti.fawe.object.FaweLimit;
|
||||
import com.boydti.fawe.object.brush.visualization.VirtualWorld;
|
||||
@ -173,7 +171,7 @@ public interface Actor extends Identifiable, SessionOwner, Subject, MapMetadatab
|
||||
boolean runAction(Runnable ifFree, boolean checkFree, boolean async);
|
||||
|
||||
/**
|
||||
* Decline any pending actions
|
||||
* Decline any pending actions.
|
||||
* @return true if an action was pending
|
||||
*/
|
||||
default boolean decline() {
|
||||
@ -186,7 +184,7 @@ public interface Actor extends Identifiable, SessionOwner, Subject, MapMetadatab
|
||||
}
|
||||
|
||||
/**
|
||||
* Confirm any pending actions
|
||||
* Confirm any pending actions.
|
||||
* @return true if an action was pending
|
||||
*/
|
||||
default boolean confirm() {
|
||||
@ -199,9 +197,9 @@ public interface Actor extends Identifiable, SessionOwner, Subject, MapMetadatab
|
||||
}
|
||||
|
||||
/**
|
||||
* Queue an action to run async
|
||||
* Queue an action to run async.
|
||||
*
|
||||
* @param run
|
||||
* @param run the action to run
|
||||
*/
|
||||
default void queueAction(Runnable run) {
|
||||
runAction(run, false, true);
|
||||
@ -227,7 +225,7 @@ public interface Actor extends Identifiable, SessionOwner, Subject, MapMetadatab
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to cancel all pending and running actions
|
||||
* Attempt to cancel all pending and running actions.
|
||||
* @param close if Extents are closed
|
||||
* @return number of cancelled actions
|
||||
*/
|
||||
@ -252,8 +250,7 @@ public interface Actor extends Identifiable, SessionOwner, Subject, MapMetadatab
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
try {
|
||||
world.close(false);
|
||||
} catch (IOException e) {
|
||||
|
@ -19,11 +19,6 @@
|
||||
|
||||
package com.sk89q.worldedit.extension.platform;
|
||||
|
||||
import com.sk89q.worldedit.internal.block.BlockStateIdAccess;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.registry.BlockRegistry;
|
||||
|
||||
/**
|
||||
* A collection of capabilities that a {@link Platform} may support.
|
||||
*/
|
||||
|
@ -55,7 +55,7 @@ public interface Locatable {
|
||||
*
|
||||
* @param pos where to move them
|
||||
* @deprecated This method may fail without indication. Use {@link #trySetPosition(Vector3)}
|
||||
* instead
|
||||
* instead
|
||||
*/
|
||||
@Deprecated
|
||||
default void setPosition(Vector3 pos) {
|
||||
|
@ -27,11 +27,10 @@ import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.registry.Registries;
|
||||
import org.enginehub.piston.CommandManager;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a platform that WorldEdit has been implemented for.
|
||||
@ -177,5 +176,10 @@ public interface Platform {
|
||||
*/
|
||||
Map<Capability, Preference> getCapabilities();
|
||||
|
||||
/**
|
||||
* Get a set of {@link SideEffect}s supported by this platform.
|
||||
*
|
||||
* @return A set of supported side effects
|
||||
*/
|
||||
Set<SideEffect> getSupportedSideEffects();
|
||||
}
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
package com.sk89q.worldedit.extension.platform;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.boydti.fawe.Fawe;
|
||||
import com.boydti.fawe.command.AnvilCommands;
|
||||
import com.boydti.fawe.command.AnvilCommandsRegistration;
|
||||
@ -131,21 +129,6 @@ import com.sk89q.worldedit.util.formatting.text.format.TextColor;
|
||||
import com.sk89q.worldedit.util.logging.DynamicStreamHandler;
|
||||
import com.sk89q.worldedit.util.logging.LogFormat;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.FileHandler;
|
||||
import java.util.logging.Level;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import javax.annotation.Nullable;
|
||||
import org.enginehub.piston.Command;
|
||||
import org.enginehub.piston.CommandManager;
|
||||
import org.enginehub.piston.converter.ArgumentConverter;
|
||||
@ -171,6 +154,24 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.FileHandler;
|
||||
import java.util.logging.Level;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
|
||||
/**
|
||||
* Handles the registration and invocation of commands.
|
||||
|
@ -19,15 +19,11 @@
|
||||
|
||||
package com.sk89q.worldedit.extension.platform;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.boydti.fawe.config.Settings;
|
||||
import com.boydti.fawe.wrappers.AsyncPlayer;
|
||||
import com.boydti.fawe.wrappers.LocationMaskedPlayerWrapper;
|
||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||
import com.boydti.fawe.object.brush.visualization.VirtualWorld;
|
||||
import com.boydti.fawe.object.exception.FaweException;
|
||||
import com.boydti.fawe.object.pattern.PatternTraverser;
|
||||
import com.boydti.fawe.wrappers.LocationMaskedPlayerWrapper;
|
||||
import com.boydti.fawe.wrappers.WorldWrapper;
|
||||
import com.sk89q.worldedit.LocalConfiguration;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
@ -50,7 +46,11 @@ import com.sk89q.worldedit.session.request.Request;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
import com.sk89q.worldedit.util.SideEffect;
|
||||
import com.sk89q.worldedit.util.eventbus.Subscribe;
|
||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumMap;
|
||||
@ -60,8 +60,8 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import javax.annotation.Nullable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
/**
|
||||
* Manages registered {@link Platform}s for WorldEdit. Platforms are
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
package com.sk89q.worldedit.extension.platform;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseItemStack;
|
||||
import com.sk89q.worldedit.entity.BaseEntity;
|
||||
@ -37,12 +35,13 @@ import com.sk89q.worldedit.util.formatting.text.TextComponent;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
|
||||
import java.util.Locale;
|
||||
import com.sk89q.worldedit.world.gamemode.GameMode;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
public class PlayerProxy extends AbstractPlayerActor {
|
||||
|
||||
|
@ -1,13 +1,7 @@
|
||||
package com.sk89q.worldedit.extension.platform.binding;
|
||||
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
import com.boydti.fawe.Fawe;
|
||||
import com.boydti.fawe.util.MainUtil;
|
||||
import com.boydti.fawe.util.StringMan;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.internal.annotation.Selection;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.util.formatting.text.Component;
|
||||
import com.sk89q.worldedit.util.formatting.text.TextComponent;
|
||||
import org.enginehub.piston.CommandManager;
|
||||
@ -17,14 +11,14 @@ import org.enginehub.piston.converter.SuccessfulConversion;
|
||||
import org.enginehub.piston.inject.InjectedValueAccess;
|
||||
import org.enginehub.piston.inject.InjectedValueStore;
|
||||
import org.enginehub.piston.inject.Key;
|
||||
import org.enginehub.piston.util.ValueProvider;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
public class Bindings {
|
||||
|
||||
|
@ -9,6 +9,7 @@ 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 java.util.Locale;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
@ -14,25 +14,12 @@ import com.sk89q.worldedit.entity.Player;
|
||||
import com.sk89q.worldedit.extension.input.InputParseException;
|
||||
import com.sk89q.worldedit.extension.platform.Actor;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.history.changeset.ChangeSet;
|
||||
import com.sk89q.worldedit.internal.annotation.AllowedRegion;
|
||||
import com.sk89q.worldedit.internal.annotation.Selection;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.session.request.Request;
|
||||
import com.sk89q.worldedit.util.TreeGenerator;
|
||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||
import com.sk89q.worldedit.world.biome.BiomeTypes;
|
||||
import com.sk89q.worldedit.world.biome.Biomes;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.registry.BiomeRegistry;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.net.URI;
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
import org.enginehub.piston.inject.InjectedValueAccess;
|
||||
import org.enginehub.piston.inject.InjectedValueStore;
|
||||
import org.enginehub.piston.inject.Key;
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
package com.sk89q.worldedit.extension.platform.permission;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.sk89q.worldedit.LocalConfiguration;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.extension.platform.Actor;
|
||||
@ -28,6 +26,8 @@ import com.sk89q.worldedit.regions.selector.limit.SelectorLimits;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
public class ActorSelectorLimits implements SelectorLimits {
|
||||
|
||||
private final LocalConfiguration configuration;
|
||||
|
Reference in New Issue
Block a user