Skip to content

Instantly share code, notes, and snippets.

@Matthew-Burfield
Last active April 8, 2017 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Matthew-Burfield/ef83b0e877f417fd41272d8edf6ea21b to your computer and use it in GitHub Desktop.
Save Matthew-Burfield/ef83b0e877f417fd41272d8edf6ea21b to your computer and use it in GitHub Desktop.
const magik = magikcraft.io;
function polarbear() {
const player = magik.getSender();
const loc = player.getEyeLocation()
.toVector()
.add(player.getLocation().getDirection().multiply(10))
.toLocation(player.getWorld(), player.getLocation().getYaw(), player.getLocation().getPitch());
const polarbear = org.bukkit.entity.PolarBear;
player.getWorld().spawn(loc, polarbear.class);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment