This commit is contained in:
Trever Fischer 2012-04-24 16:51:23 -04:00
parent a83dae7eba
commit 2a8cc4f285

View File

@ -77,8 +77,12 @@ public class RegionCommand implements CommandExecutor {
p.sendMessage("City region set to "+r.name());
} else if (subCommand.equals("regen") && p.hasPermission("regions.create")) {
Region r = m_plugin.regionManager().nearestRegion(p.getLocation());
m_plugin.regenRegionPost(r);
p.sendMessage("Region post regenerated.");
if (r == null) {
p.sendMessage("There are no regions in this world.");
} else {
m_plugin.regenRegionPost(r);
p.sendMessage("Region post regenerated.");
}
} else {
p.sendMessage("Unknown operation. Options are create, remove, city.");
}