Fix console toLocation

This commit is contained in:
Jesse Boyd 2017-06-18 06:40:35 +10:00
parent 4eb9abe0c1
commit 27b035c737
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -118,7 +118,13 @@ public class FakePlayer extends LocalPlayer {
@Override
public FaweLocation getLocation() {
Location loc = FakePlayer.this.getLocation();
return new FaweLocation(loc.getExtent().toString(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
String world;
if (loc.getExtent() instanceof World) {
world = ((World) loc.getExtent()).getName();
} else {
world = loc.getExtent().toString();
}
return new FaweLocation(world, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
}
@Override