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:
@@ -1,14 +1,19 @@
|
||||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import net.minecraft.server.Entity;
|
||||
import net.minecraft.server.EntityPotion;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.ThrownPotion;
|
||||
|
||||
public class CraftThrownPotion extends CraftProjectile implements ThrownPotion {
|
||||
public CraftThrownPotion(CraftServer server, Entity entity) {
|
||||
public CraftThrownPotion(CraftServer server, EntityPotion entity) {
|
||||
super(server, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityPotion getHandle() {
|
||||
return (EntityPotion) entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftThrownPotion";
|
||||
|
||||
Reference in New Issue
Block a user