Paper/src/org/bukkit/craftbukkit/CraftPlayer.java

35 Zeilen
741 B
Java

2010-12-22 16:22:23 +01:00
package org.bukkit.craftbukkit;
2010-12-26 03:20:29 +01:00
import net.minecraft.server.EntityPlayerMP;
2010-12-22 16:22:23 +01:00
import org.bukkit.Player;
2010-12-30 05:30:12 +01:00
public class CraftPlayer extends CraftHumanEntity implements Player {
private final EntityPlayerMP entity;
2010-12-22 16:22:23 +01:00
private final String name;
2010-12-30 05:30:12 +01:00
public CraftPlayer(CraftServer server, EntityPlayerMP entity) {
super(server, entity);
this.entity = entity;
name = entity.aw;
2010-12-22 16:22:23 +01:00
}
public String getName() {
return name;
}
public boolean isOnline() {
2010-12-30 05:30:12 +01:00
return server.getHandle().g(name);
2010-12-22 16:22:23 +01:00
}
2010-12-27 03:13:03 +01:00
2010-12-30 05:30:12 +01:00
@Override
public EntityPlayerMP getHandle() {
return entity;
}
2010-12-29 01:29:18 +01:00
@Override
public String toString() {
return "CraftPlayer{" + "name=" + name + '}';
}
2010-12-22 16:22:23 +01:00
}