Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package spawn;
- import org.bukkit.Bukkit;
- import org.bukkit.Location;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.java.JavaPlugin;
- public final class Main extends JavaPlugin{
- public static void main() {
- }
- public void onEnable()
- {
- System.out.println("§aPlugin loaddato correttamente.");
- }
- public void onDisable()
- {
- System.out.println("§cPlugin disabilitato...");
- }
- double x = -1044.437;
- double y = 58.0;
- double z = -2224.281;
- float yaw = 0;
- float pitch = 0;
- public boolean onCommand(CommandSender sender, Command command, String label, String [] args)
- {
- Player p = (Player)sender;
- if(label.equalsIgnoreCase("spawn") || args.length > 0)
- {
- if (sender.hasPermission("spawn.spawn"))
- {
- Location lochescion = new Location (Bukkit.getWorld("world"), x, y, z);
- lochescion.setYaw(yaw);
- lochescion.setPitch(pitch);
- p.teleport(lochescion);
- p.sendMessage("§5§lSky§e§lGames §8§l» §r§7Teletrasporto in corso...");
- }
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement