ScruffyRules

Untitled

Apr 11th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (item.getType() == Material.COMPASS); {
  2. Location spawn = player.getWorld().getSpawnLocation();
  3. //Amount can be edit in the config
  4. //Getting the integer of Amount
  5. int amount = plugin.getConfig().getInt("Amount");
  6. //Making a new location with original values for spawn + the y-value.
  7. spawn.setY(spawn.getY() + amount);
  8.  
  9. //Teleport player + Message
  10. player.teleport(spawn);
  11. player.sendMessage("You have been teleported");
  12.  
  13. player.getWorld().playEffect(player.getLocation(), Effect.BLAZE_SHOOT, 1);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment