org.bukkit.craftbukkit.entity.CraftEnderDragon Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chest-server Show documentation
Show all versions of chest-server Show documentation
A spigot fork to kotlin structure and news.
The newest version!
package org.bukkit.craftbukkit.entity;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSet.Builder;
import net.minecraft.server.EntityComplexPart;
import net.minecraft.server.EntityEnderDragon;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.ComplexEntityPart;
import org.bukkit.entity.EnderDragon;
import org.bukkit.entity.EntityType;
import java.util.Set;
public class CraftEnderDragon extends CraftComplexLivingEntity implements EnderDragon {
public CraftEnderDragon(CraftServer server, EntityEnderDragon entity) {
super(server, entity);
}
public Set getParts() {
Builder builder = ImmutableSet.builder();
for (EntityComplexPart part : getHandle().children) {
builder.add((ComplexEntityPart) part.getBukkitEntity());
}
return builder.build();
}
@Override
public EntityEnderDragon getHandle() {
return (EntityEnderDragon) entity;
}
@Override
public String toString() {
return "CraftEnderDragon";
}
public EntityType getType() {
return EntityType.ENDER_DRAGON;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy