Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(Player online : Bukkit.getOnlinePlayers()) {
- if(p1.contains(online.getName())) {
- online.sendMessage(WHITE+"["+GOLD+""+BOLD+"P"+YELLOW+""+BOLD+"S"+WHITE+"]"+YELLOW+" Teleporting To Arena");
- int x = yamlFile.getInt("pos1.x");
- int y = yamlFile.getInt("pos1.y");
- int z = yamlFile.getInt("pos1.z");
- int yaw = yamlFile.getInt("pos1.yaw");
- int pitch = yamlFile.getInt("pos1.pitch");
- Location loc1 = new Location(Bukkit.getWorld(yamlFile.getString("pos1.world")), x + 0.5, y, z + 0.5, yaw, pitch);
- online.teleport(loc1);
- m.add(online.getName());
- online.getInventory().clear();
- ItemStack potato = new ItemStack(Material.BAKED_POTATO);
- ItemMeta potatoMeta = potato.getItemMeta();
- potatoMeta.setDisplayName(GOLD+""+BOLD+"Potato Smash");
- potatoMeta.addEnchant(Enchantment.KNOCKBACK, 6, true);
- potato.setItemMeta(potatoMeta);
- online.getInventory().addItem(potato);
- }
- if(p2.contains(online.getName())) {
- online.sendMessage(WHITE+"["+GOLD+""+BOLD+"P"+YELLOW+""+BOLD+"S"+WHITE+"]"+YELLOW+" Teleporting To Arena");
- int x = yamlFile.getInt("pos2.x");
- int y = yamlFile.getInt("pos2.y");
- int z = yamlFile.getInt("pos2.z");
- int yaw = yamlFile.getInt("pos2.yaw");
- int pitch = yamlFile.getInt("pos2.pitch");
- Location loc2 = new Location(Bukkit.getWorld(yamlFile.getString("pos2.world")), x + 0.5, y, z + 0.5, yaw, pitch);
- online.teleport(loc2);
- m.add(online.getName());
- online.getInventory().clear();
- ItemStack potato = new ItemStack(Material.BAKED_POTATO);
- ItemMeta potatoMeta = potato.getItemMeta();
- potatoMeta.setDisplayName(GOLD+""+BOLD+"Potato Smash");
- potatoMeta.addEnchant(Enchantment.KNOCKBACK, 6, true);
- potato.setItemMeta(potatoMeta);
- online.getInventory().addItem(potato);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement