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