ClaimedResidence newRes = new ClaimedResidence(owner, loc1.getWorld().getName());
newRes.getPermissions().applyDefaultFlags();
newRes.setEnterMessage(group.getDefaultEnterMessage());
newRes.setLeaveMessage(group.getDefaultLeaveMessage());
ResidenceCreationEvent resevent = new ResidenceCreationEvent(player, name, newRes, newArea);
Residence.getServ().getPluginManager().callEvent(resevent);
if (resevent.isCancelled()) {
return false;
}
newArea = resevent.getPhysicalArea();
name = resevent.getResidenceName();
if (residences.containsKey(name)) {
if (player != null) {
player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("ResidenceAlreadyExists", ChatColor.YELLOW + name + ChatColor.RED));
}
return false;