Advertisement
Guest User

Untitled

a guest
Jan 1st, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for(Player online : Bukkit.getOnlinePlayers()) {
  2.                                                 if(p1.contains(online.getName())) {
  3.                                                     online.sendMessage(WHITE+"["+GOLD+""+BOLD+"P"+YELLOW+""+BOLD+"S"+WHITE+"]"+YELLOW+" Teleporting To Arena");
  4.                                                     int x = yamlFile.getInt("pos1.x");
  5.                                                     int y = yamlFile.getInt("pos1.y");
  6.                                                     int z = yamlFile.getInt("pos1.z");
  7.                                                     int yaw = yamlFile.getInt("pos1.yaw");
  8.                                                     int pitch = yamlFile.getInt("pos1.pitch");
  9.                                                     Location loc1 = new Location(Bukkit.getWorld(yamlFile.getString("pos1.world")), x + 0.5, y, z + 0.5, yaw, pitch);
  10.                                                     online.teleport(loc1);
  11.                                                     m.add(online.getName());
  12.  
  13.                                                     online.getInventory().clear();
  14.                                                     ItemStack potato = new ItemStack(Material.BAKED_POTATO);
  15.                                                     ItemMeta potatoMeta = potato.getItemMeta();
  16.                                                     potatoMeta.setDisplayName(GOLD+""+BOLD+"Potato Smash");
  17.                                                     potatoMeta.addEnchant(Enchantment.KNOCKBACK, 6, true);
  18.                                                     potato.setItemMeta(potatoMeta);
  19.  
  20.                                                     online.getInventory().addItem(potato);
  21.                                                 }
  22.  
  23.                                                 if(p2.contains(online.getName())) {
  24.                                                     online.sendMessage(WHITE+"["+GOLD+""+BOLD+"P"+YELLOW+""+BOLD+"S"+WHITE+"]"+YELLOW+" Teleporting To Arena");
  25.                                                     int x = yamlFile.getInt("pos2.x");
  26.                                                     int y = yamlFile.getInt("pos2.y");
  27.                                                     int z = yamlFile.getInt("pos2.z");
  28.                                                     int yaw = yamlFile.getInt("pos2.yaw");
  29.                                                     int pitch = yamlFile.getInt("pos2.pitch");
  30.                                                     Location loc2 = new Location(Bukkit.getWorld(yamlFile.getString("pos2.world")), x + 0.5, y, z + 0.5, yaw, pitch);
  31.                                                     online.teleport(loc2);
  32.                                                     m.add(online.getName());
  33.  
  34.                                                     online.getInventory().clear();
  35.                                                     ItemStack potato = new ItemStack(Material.BAKED_POTATO);
  36.                                                     ItemMeta potatoMeta = potato.getItemMeta();
  37.                                                     potatoMeta.setDisplayName(GOLD+""+BOLD+"Potato Smash");
  38.                                                     potatoMeta.addEnchant(Enchantment.KNOCKBACK, 6, true);
  39.                                                     potato.setItemMeta(potatoMeta);
  40.  
  41.                                                     online.getInventory().addItem(potato);
  42.                                                 }
  43.                                             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement