magnusulf / Factions

https://muj.dk/factions
23 stars 15 forks source link

NullPointerException when clearing faction MOTD #82

Closed tierrif closed 3 years ago

tierrif commented 4 years ago

Affected Plugin

Describe your Environment

Steps to Reproduce this Bug

  1. Set your faction MOTD (/f motd \<motdMessage>).
  2. Clear it with any MOTD clear sub-command (/f motd c).
  3. Observe your chat and server console.

Observed Results

The following stacktrace is printed:

[16:09:00 INFO]: HotLava03 issued server command: /f motd c
[16:09:00 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'f motd c' in com.massivecraft.massivecore.command.MassiveCoreBukkitCommand(f)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:161) ~[patched_1.13.2.jar:git-Paper-652]
    at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchCommand(CraftServer.java:734) ~[patched_1.13.2.jar:git-Paper-652]
    at net.minecraft.server.v1_13_R2.PlayerConnection.handleCommand(PlayerConnection.java:1783) ~[patched_1.13.2.jar:git-Paper-652]
    at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1591) ~[patched_1.13.2.jar:git-Paper-652]
    at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[patched_1.13.2.jar:git-Paper-652]
    at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.13.2.jar:git-Paper-652]
    at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:15) ~[patched_1.13.2.jar:git-Paper-652]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
    at net.minecraft.server.v1_13_R2.SystemUtils.a(SystemUtils.java:108) ~[patched_1.13.2.jar:git-Paper-652]
    at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1018) ~[patched_1.13.2.jar:git-Paper-652]
    at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:439) ~[patched_1.13.2.jar:git-Paper-652]
    at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:940) ~[patched_1.13.2.jar:git-Paper-652]
    at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:837) ~[patched_1.13.2.jar:git-Paper-652]
    at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NullPointerException
    at com.massivecraft.factions.cmd.CmdFactionsMotd.perform(CmdFactionsMotd.java:45) ~[?:?]
    at com.massivecr
aft.massivecore.command.MassiveCommand.execute(MassiveCommand.java:1176) ~[?:?]
    at com.massivecraft.massivecore.command.MassiveCommand.execute(MassiveCommand.java:1132) ~[?:?]
    at com.massivecraft.massivecore.command.MassiveCoreBukkitCommand.execute(MassiveCoreBukkitCommand.java:60) ~[?:?]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:151) ~[patched_1.13.2.jar:git-Paper-652]
    ... 14 more

Expected Results

The MOTD should be cleared successfully.