Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. if(command.getName().equalsIgnoreCase(label)){
  2. if(!(sender instanceof Player)){
  3. sender.sendMessage("§cApenas jogadores podem usar este comando!");
  4. return true;
  5. }
  6.  
  7. Player p = (Player) sender;
  8. if(Main.getInstance().getConfig().contains(label)){
  9.  
  10. Double X = Main.getInstance().getConfig().getDouble(label + ".X");
  11. Double Y = Main.getInstance().getConfig().getDouble(label + ".Y");
  12. Double Z = Main.getInstance().getConfig().getDouble(label + ".Z");
  13. float Pitch = (float)Main.getInstance().getConfig().getDouble(label + ".Pitch");
  14. float Yaw = (float)Main.getInstance().getConfig().getDouble(label + ".Yaw");
  15. World W = Bukkit.getWorld(Main.getInstance().getConfig().getString(label + ".World"));
  16.  
  17. Location label1 = new Location(W, X, Y, Z, Yaw, Pitch);
  18. p.teleport(label1);
  19. p.sendMessage("§6Teleportado com sucesso!");
  20.  
  21. }
  22.  
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement