From c4127c35adea9df4938995ede153c19c17aac7fc Mon Sep 17 00:00:00 2001 From: Brettflan Date: Thu, 29 Mar 2012 07:52:11 -0500 Subject: [PATCH] If attempting to get MarkerAPI from DynMap results in an NPE (like version 0.35 if DynMap's Spout integration fails), it will no longer prevent WorldBorder from continuing to load. --- src/com/wimbli/WorldBorder/DynMapFeatures.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/com/wimbli/WorldBorder/DynMapFeatures.java b/src/com/wimbli/WorldBorder/DynMapFeatures.java index 3e4df24..ef9ce81 100644 --- a/src/com/wimbli/WorldBorder/DynMapFeatures.java +++ b/src/com/wimbli/WorldBorder/DynMapFeatures.java @@ -57,8 +57,16 @@ public class DynMapFeatures return; } - markApi = api.getMarkerAPI(); - if (markApi == null) return; + try + { + markApi = api.getMarkerAPI(); + if (markApi == null) return; + } + catch (NullPointerException ex) + { + Config.LogConfig("DynMap is present, but a NullPointerException was encountered while attempting to integrate. Border display disabled."); + return; + } // go ahead and show borders for all worlds showAllBorders();