Added chunk/block/location/world

This commit is contained in:
Dinnerbone
2010-12-27 02:13:03 +00:00
parent b5aa876278
commit b04fa07b45
5 changed files with 318 additions and 2 deletions

View File

@@ -2,7 +2,9 @@
package org.bukkit.craftbukkit;
import net.minecraft.server.EntityPlayerMP;
import org.bukkit.Location;
import org.bukkit.Player;
import org.bukkit.World;
public class CraftPlayer implements Player {
private EntityPlayerMP player;
@@ -22,4 +24,12 @@ public class CraftPlayer implements Player {
public boolean isOnline() {
return server.server.g(name);
}
public Location getLocation() {
return new Location(getWorld(), player.p, player.q, player.r);
}
public World getWorld() {
return server.getWorld(player.b.e);
}
}