Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.10 KB | None | 0 0
  1. package spawn;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.Location;
  5. import org.bukkit.command.Command;
  6. import org.bukkit.command.CommandSender;
  7. import org.bukkit.entity.Player;
  8. import org.bukkit.plugin.java.JavaPlugin;
  9.  
  10. public final class Main extends JavaPlugin{
  11.  
  12.     public static void main() {
  13.     }
  14.     public void onEnable()
  15.     {
  16.         System.out.println("§aPlugin loaddato correttamente.");
  17.     }
  18.     public void onDisable()
  19.     {
  20.         System.out.println("§cPlugin disabilitato...");
  21.     }
  22.     double x = -1044.437;
  23.     double y = 58.0;
  24.     double z = -2224.281;
  25.     float yaw = 0;
  26.     float pitch = 0;
  27.     public boolean onCommand(CommandSender sender, Command command, String label, String [] args)
  28.     {
  29.         Player p = (Player)sender;
  30.         if(label.equalsIgnoreCase("spawn") || args.length > 0)
  31.         {
  32.             if (sender.hasPermission("spawn.spawn"))
  33.             {
  34.                 Location lochescion = new Location (Bukkit.getWorld("world"), x, y, z);
  35.                 lochescion.setYaw(yaw);
  36.                 lochescion.setPitch(pitch);
  37.                 p.teleport(lochescion);
  38.                 p.sendMessage("§5§lSky§e§lGames §8§l» §r§7Teletrasporto in corso...");
  39.             }
  40.         }
  41.         return true;
  42.     }  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement