Don't try to set search radius when portal travel agent is null. Fixes #1072.
This commit is contained in:
parent
07a38e3e58
commit
8bfe3a5473
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue