Skip to content

Instantly share code, notes, and snippets.

@jwulf
Created January 29, 2018 00:39
Show Gist options
  • Select an option

  • Save jwulf/a548b403a068dcb63c27e99358766c43 to your computer and use it in GitHub Desktop.

Select an option

Save jwulf/a548b403a068dcb63c27e99358766c43 to your computer and use it in GitHub Desktop.
const magik = magikcraft.io;
function zombie(target: string){
const EntityType = magik.type("entity.EntityType");
const aZombie = EntityType['ZOMBIE'];
const where = magik.aspecto();
const world = where.getWorld();
const zombie = world.spawnEntity(where, aZombie);
if (target) {
zombie.setTarget(magik.getPlugin().getServer().getPlayer(target));
}
magik.dixit("Behold!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment