region priority is now set correctly in /region claim

This commit is contained in:
Redecouverte 2011-02-27 18:40:32 +01:00
parent f338650b24
commit c74433422a
2 changed files with 4 additions and 0 deletions

View File

@ -114,6 +114,7 @@ public boolean handle(CommandSender sender, String senderName, String command, S
player.sendMessage(ChatColor.RED + "This region overlaps with someone else's region."); player.sendMessage(ChatColor.RED + "This region overlaps with someone else's region.");
return true; return true;
} }
region.setPriority(regions.getAffectedRegionPriority() + 1);
} }
else else
{ {

View File

@ -410,6 +410,9 @@ public String getAffectedRegionId() {
return affectedRegion != null ? affectedRegion.getId() : ""; return affectedRegion != null ? affectedRegion.getId() : "";
} }
public int getAffectedRegionPriority() {
return affectedRegion != null ? affectedRegion.getPriority() : 0;
}
/** /**
* Clear a region's parents for isFlagAllowed(). * Clear a region's parents for isFlagAllowed().