Andrew Ardill 2759809ecb Fix Craft Entity constructors and toStrings.
Also, standardise getHandle and clean up in general.
getHandle is now using the 'entity' member variable instead of
super.getHandle, as this reduces the number of chained calls needed.
2011-11-29 21:22:35 +11:00

28 lines
769 B
Java

package org.bukkit.craftbukkit.entity;
import net.minecraft.server.Entity;
import net.minecraft.server.EntityComplexPart;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.ComplexEntityPart;
import org.bukkit.entity.ComplexLivingEntity;
public class CraftComplexPart extends CraftEntity implements ComplexEntityPart {
public CraftComplexPart(CraftServer server, EntityComplexPart entity) {
super(server, entity);
}
public ComplexLivingEntity getParent() {
return (ComplexLivingEntity) getHandle().a.getBukkitEntity();
}
@Override
public EntityComplexPart getHandle() {
return (EntityComplexPart) entity;
}
@Override
public String toString() {
return "CraftComplexPart";
}
}