mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Added a method to teleport entities across worlds.
This commit is contained in:
committed by
IronApollo
parent
7a9bd226ce
commit
c935e381b7
@ -71,6 +71,16 @@ public class BukkitEntity implements Entity {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setLocation(Location location) {
|
||||
org.bukkit.entity.Entity entity = entityRef.get();
|
||||
if (entity != null) {
|
||||
return entity.teleport(BukkitAdapter.adapt(location));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseEntity getState() {
|
||||
org.bukkit.entity.Entity entity = entityRef.get();
|
||||
|
@ -236,6 +236,11 @@ public class BukkitPlayer extends AbstractPlayerActor {
|
||||
nativeLocation.getPitch());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setLocation(com.sk89q.worldedit.util.Location location) {
|
||||
return player.teleport(BukkitAdapter.adapt(location));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public <T> T getFacet(Class<? extends T> cls) {
|
||||
|
Reference in New Issue
Block a user