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.
This commit is contained in:
@@ -6,12 +6,17 @@ import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.ComplexLivingEntity;
|
||||
|
||||
public abstract class CraftComplexLivingEntity extends CraftLivingEntity implements ComplexLivingEntity {
|
||||
public CraftComplexLivingEntity(CraftServer server, EntityLiving entity) {
|
||||
public CraftComplexLivingEntity(CraftServer server, EntityComplex entity) {
|
||||
super(server, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityComplex getHandle() {
|
||||
return (EntityComplex)super.getHandle();
|
||||
return (EntityComplex) entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftComplexLivingEntity";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user