public void setOwner(Region r, String name, String owner, Player p) { if (r == null) { p.sendMessage( ChatColor.RED + "[Regios] The region to inherit : " + ChatColor.BLUE + name + ChatColor.RED + " does not exist!"); return; } if (!r.canModify(p)) { p.sendMessage(ChatColor.RED + "[Regios] You are not permitted to modify this region!"); return; } mutable.setOwner(r, owner); p.sendMessage( ChatColor.GREEN + "[Regios] Owner for region " + ChatColor.BLUE + name + ChatColor.GREEN + " changed to " + ChatColor.BLUE + owner); }
public void inherit(Region tin, Region inf, String tinName, String infName, Player p) { if (tin == null) { p.sendMessage( ChatColor.RED + "[Regios] The region to inherit : " + ChatColor.BLUE + tinName + ChatColor.RED + " does not exist!"); return; } if (inf == null) { p.sendMessage( ChatColor.RED + "[Regios] The region to inherit from : " + ChatColor.BLUE + infName + ChatColor.RED + " does not exist!"); return; } if (!tin.canModify(p)) { p.sendMessage(ChatColor.RED + "[Regios] You are not permitted to modify this region!"); return; } mutable.inherit(tin, inf); p.sendMessage( ChatColor.GREEN + "[Regios] Region " + ChatColor.BLUE + tinName + ChatColor.GREEN + " inherited properties from region " + ChatColor.BLUE + infName); return; }