webbukkit / Dynmap-Factions

Display faction
Display Factions regions on Dynmap's maps, with live update
6 stars 17 forks source link

Fix NullPointerException exception when not having a description on a faction #23

Closed AntonUden closed 2 years ago

AntonUden commented 3 years ago

Fix for the following error by null checking description

java.lang.NullPointerException: null at java.lang.String.replace(String.java:2240) ~[?:1.8.0_262] at org.dynmap.factions.DynmapFactionsPlugin.formatInfoWindow(DynmapFactionsPlugin.java:207) ~[?:?] at org.dynmap.factions.DynmapFactionsPlugin.handleFactionOnWorld(DynmapFactionsPlugin.java:312) ~[?:?] at org.dynmap.factions.DynmapFactionsPlugin.updateFactions(DynmapFactionsPlugin.java:507) ~[?:?] at org.dynmap.factions.DynmapFactionsPlugin.access$000(DynmapFactionsPlugin.java:49) ~[?:?] at org.dynmap.factions.DynmapFactionsPlugin$FactionsUpdate.run(DynmapFactionsPlugin.java:133) ~[?:?] at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:76) ~[spigot.jar:git-Spigot-79a30d7-acbc348] at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:361) [spigot.jar:git-Spigot-79a30d7-acbc348] at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:739) [spigot.jar:git-Spigot-79a30d7-acbc348] at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [spigot.jar:git-Spigot-79a30d7-acbc348] at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot.jar:git-Spigot-79a30d7-acbc348] at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot.jar:git-Spigot-79a30d7-acbc348] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_262]

This error was caused by not having a description for a faction on the following setup: Spigot 1.12.2 Dynmap 3.1 beta 3a Factions 2.14.0 MassiveCore 2.14.0 WorldEdit 6.1.9 WorldGuard 6.2.2