Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.06 KB | None | 0 0
  1. if (args[0].equalsIgnoreCase("createarena")) {
  2.                             if (p.hasPermission("ffa.createarena")) {
  3.                                 if (args.length == 1) {
  4.                                     p.sendMessage(getPrefix() + ChatColor.RED + " You must specify an arena name.");
  5.                                 }
  6.                                 else if (args.length == 2) {
  7.                                     // Create arena.
  8.                                     p.sendMessage("args length is 2");
  9.                                     plugin.config.set("arenas." + args [1] + ".name", args[1]);
  10.                                     plugin.config.set("arenas." + args [1] + ".x", p.getLocation().getX());
  11.                                     plugin.config.set("arenas." + args [1] + ".y", p.getLocation().getY());
  12.                                     plugin.config.set("arenas." + args [1] + ".z", p.getLocation().getZ());
  13.                                     plugin.config.set("arenas." + args [1] + ".world", p.getLocation().getWorld());
  14.                                     plugin.config.getStringList("arenanames").add(args[1]);
  15.                                     plugin.reloadConfig();
  16.                                     p.sendMessage(getPrefix() + ChatColor.GOLD + "Successfully created arena " + args[1] + ".");
  17.                                 }
  18.                             } else {
  19.                                 p.sendMessage(getPrefix() + ChatColor.RED + " You don't have permission.");
  20.                             }
  21.                         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement