mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:28:35 +00:00
feature(cli): Added a CLI version of WorldEdit, and allowed most commands to be run from console (#508)
* Re-do commits to avoid awful rebase * You can load and save a schematic file now. Still gotta setup ability to use commands as a console actor. * Add a world override concept to LocalSession, and allow a lot more commands to be performed by actors. * Fixed commands, and set the loaded schematic as the world override in CLI * Properly load tags * Added 1.14.4 data values * Allow a majority of commands to be performed by the console. * Fixed a lot of PR requested changes * Added a Locatable interface and use that for getting the location of the player in commands. * Added script support. Currently requires a newline at the end of the script. * Shade everything to allow this to run locally - should probably minimize this to an extent later. * Actually hook up the version * Added a //world command to set the override * Fixed a missed checkstyle issue * Added CommandBlock support to Bukkit * Make command block support configurable * Minor cleanup and implementing a few of the final functions * Fixed most issues from PR * Improve UX, saving is now automatic and unknown command messages show * Better save docs and support any clipboard format * Include the entire formats list * Arrays.copyOf * Clear the world override if the selector is called on another world. * Update logging extent to allow basic logging with non-player actors
This commit is contained in:
@ -19,9 +19,9 @@
|
||||
|
||||
package com.sk89q.worldedit.entity;
|
||||
|
||||
import com.sk89q.worldedit.extension.platform.Locatable;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.util.Faceted;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@ -33,7 +33,7 @@ import javax.annotation.Nullable;
|
||||
* instance of an entity, but a {@link BaseEntity} can be created from
|
||||
* this entity by calling {@link #getState()}.</p>
|
||||
*/
|
||||
public interface Entity extends Faceted {
|
||||
public interface Entity extends Faceted, Locatable {
|
||||
|
||||
/**
|
||||
* Get a copy of the entity's state.
|
||||
@ -47,28 +47,6 @@ public interface Entity extends Faceted {
|
||||
@Nullable
|
||||
BaseEntity getState();
|
||||
|
||||
/**
|
||||
* Get the location of this entity.
|
||||
*
|
||||
* @return the location of the entity
|
||||
*/
|
||||
Location getLocation();
|
||||
|
||||
/**
|
||||
* Sets the location of this entity.
|
||||
*
|
||||
* @param location the new location of the entity
|
||||
* @return if the teleport worked
|
||||
*/
|
||||
boolean setLocation(Location location);
|
||||
|
||||
/**
|
||||
* Get the extent that this entity is on.
|
||||
*
|
||||
* @return the extent
|
||||
*/
|
||||
Extent getExtent();
|
||||
|
||||
/**
|
||||
* Remove this entity from it container.
|
||||
*
|
||||
|
@ -191,8 +191,12 @@ public interface Player extends Entity, Actor {
|
||||
* Get the point of the block that is being stood in.
|
||||
*
|
||||
* @return point
|
||||
* @deprecated Use Locatable#getBlockLocation
|
||||
*/
|
||||
Location getBlockIn();
|
||||
@Deprecated
|
||||
default Location getBlockIn() {
|
||||
return getBlockLocation();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the point of the block that is being stood upon.
|
||||
@ -281,13 +285,6 @@ public interface Player extends Entity, Actor {
|
||||
*/
|
||||
void setPosition(Vector3 pos, float pitch, float yaw);
|
||||
|
||||
/**
|
||||
* Move the player.
|
||||
*
|
||||
* @param pos where to move them
|
||||
*/
|
||||
void setPosition(Vector3 pos);
|
||||
|
||||
/**
|
||||
* Sends a fake block to the client.
|
||||
*
|
||||
|
Reference in New Issue
Block a user