mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 08:18:35 +00:00
merge
This commit is contained in:
@ -19,11 +19,10 @@
|
||||
|
||||
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 com.sk89q.worldedit.world.entity.EntityType;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
@ -34,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.
|
||||
@ -48,33 +47,11 @@ 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);
|
||||
|
||||
default EntityType getType() {
|
||||
BaseEntity state = getState();
|
||||
return state != null ? state.getType() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
Reference in New Issue
Block a user