Don't try to set search radius when portal travel agent is null. Fixes #1072.

This commit is contained in:
Jeremy Wood 2013-02-04 15:15:52 -05:00
parent 07a38e3e58
commit 8bfe3a5473
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@ public class MVPlayerListener implements Listener {
+ "' was allowed to go to '" + event.getTo().getWorld().getName()
+ "' because enforceaccess is off.");
}
if (!plugin.getMVConfig().isUsingDefaultPortalSearch()) {
if (!plugin.getMVConfig().isUsingDefaultPortalSearch() && event.getPortalTravelAgent() != null) {
event.getPortalTravelAgent().setSearchRadius(plugin.getMVConfig().getPortalSearchRadius());
}
}