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:
@@ -10,11 +10,6 @@ public class CraftExperienceOrb extends CraftEntity implements ExperienceOrb {
|
||||
super(server, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityExperienceOrb getHandle() {
|
||||
return (EntityExperienceOrb) super.getHandle();
|
||||
}
|
||||
|
||||
public int getExperience() {
|
||||
return getHandle().value;
|
||||
}
|
||||
@@ -22,4 +17,14 @@ public class CraftExperienceOrb extends CraftEntity implements ExperienceOrb {
|
||||
public void setExperience(int value) {
|
||||
getHandle().value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityExperienceOrb getHandle() {
|
||||
return (EntityExperienceOrb) entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftExperienceOrb";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user