Skip to content

Instantly share code, notes, and snippets.

@jwulf
Created October 6, 2019 21:56
Show Gist options
  • Save jwulf/dcff4ca2fa866c9c486c702e0eff9563 to your computer and use it in GitHub Desktop.
Save jwulf/dcff4ca2fa866c9c486c702e0eff9563 to your computer and use it in GitHub Desktop.
const magik = magikcraft.io;
function main() {
const Villager = Java.type("org.bukkit.entity.EntityType").VILLAGER;
const world = magik.getSender().getWorld();
const start = magik.aspecto();
const mob = world.spawnEntity(start, Villager);
mob.setCustomName('Curly')
mob.setCustomNameVisible(true)
const timer = setInterval(() => self.setCompassTarget(mob.getLocation()), 1000)
setTimeout(() => clearInterval(timer), 60000)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment