crwdns151981:0crwdne151981:0
crwdns151983:0:javadoc:crwdnd151983:0:javadoc:crwdnd151983:0:javadoc:crwdnd151983:0:javadoc:crwdne151983:0
crwdns151985:0crwdne151985:0
import org.spongepowered.api.entity.Entity;
import org.spongepowered.api.entity.EntityTypes;
import org.spongepowered.api.event.cause.Cause;
import org.spongepowered.api.event.cause.entity.spawn.SpawnCause;
import org.spongepowered.api.event.cause.entity.spawn.SpawnTypes;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import java.util.Optional;
public void spawnEntity(Location<World> spawnLocation) {
World world = spawnLocation.getExtent();
Entity creeper = world
.createEntity(EntityTypes.CREEPER, spawnLocation.getPosition());
SpawnCause spawnCause = SpawnCause.builder().type(SpawnTypes.PLUGIN).build();
world.spawnEntity(creeper, Cause.source(spawnCause).build());
}
crwdns151987:0:javadoc:crwdne151987:0
crwdns151989:0:javadoc:crwdnd151989:0:javadoc:crwdnd151989:0:javadoc:crwdne151989:0