eldoriarpg / BigDoorOpener

Control the state of doors created by BigDoors by time and by approaching, permissions and more.
GNU Affero General Public License v3.0
5 stars 4 forks source link

NPE on info for unmanaged door #46

Closed SlimeDog closed 3 years ago

SlimeDog commented 3 years ago

Platform: Paper/Spigot/... Version: 1.16.5

Big Doors Opener Version: 2.4.1 Big Doors Version: Alpha 0.1.8.28 (b882)

Problem NPE if _bdo info _ where door_id is unmanaged by BDO (including doors that don't exist).

Expected behavior Message to the effect that the selected door is not managed by BDO.

Stacktrace If you encounter a stackstrace (Some complicated looking stuff with error or warning) please include it here:

> bdo info 50
[15:30:48 WARN]: Unexpected exception while parsing console command "bdo info 50"
org.bukkit.command.CommandException: Unhandled exception executing command 'bdo' in plugin BigDoorsOpener v2.4.1
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[patched_1.16.5.jar:git-Paper-588]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.16.5.jar:git-Paper-588]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:810) ~[patched_1.16.5.jar:git-Paper-588]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchServerCommand(CraftServer.java:772) ~[patched_1.16.5.jar:git-Paper-588]
        at net.minecraft.server.v1_16_R3.DedicatedServer.handleCommandQueue(DedicatedServer.java:452) ~[patched_1.16.5.jar:git-Paper-588]
        at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:419) ~[patched_1.16.5.jar:git-Paper-588]
        at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1328) ~[patched_1.16.5.jar:git-Paper-588]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1116) ~[patched_1.16.5.jar:git-Paper-588]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:289) ~[patched_1.16.5.jar:git-Paper-588]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NullPointerException
        at de.eldoria.bigdoorsopener.eldoutilities.messages.MessageChannel$1.sendMessage(MessageChannel.java:29) ~[?:?]
        at de.eldoria.bigdoorsopener.eldoutilities.messages.MessageSender.send(MessageSender.java:396) ~[?:?]
        at de.eldoria.bigdoorsopener.eldoutilities.messages.MessageSender.send(MessageSender.java:376) ~[?:?]
        at de.eldoria.bigdoorsopener.eldoutilities.messages.MessageSender.sendError(MessageSender.java:154) ~[?:?]
        at de.eldoria.bigdoorsopener.core.adapter.BigDoorsAdapterCommand.getPlayerDoor(BigDoorsAdapterCommand.java:117) ~[?:?]
        at de.eldoria.bigdoorsopener.core.adapter.BigDoorsAdapterCommand.getConditionalPlayerDoor(BigDoorsAdapterCommand.java:201) ~[?:?]
        at de.eldoria.bigdoorsopener.commands.bdosubcommands.Info.onCommand(Info.java:54) ~[?:?]
        at de.eldoria.bigdoorsopener.eldoutilities.simplecommands.EldoCommand.lambda$onCommand$0(EldoCommand.java:73) ~[?:?]
        at java.util.Optional.map(Optional.java:265) ~[?:?]
        at de.eldoria.bigdoorsopener.eldoutilities.simplecommands.EldoCommand.onCommand(EldoCommand.java:73) ~[?:?]
        at de.eldoria.bigdoorsopener.commands.BDOCommand.onCommand(BDOCommand.java:64) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.16.5.jar:git-Paper-588]
        ... 9 more

Config Please include a copy of your config with at least one door object

# Dont touch it or at least dont complain when everything burns.
# No version = 1.x
# version 1 = 2.x
version: 1
checkUpdates: false
refreshRate: 20
language: en_US
timedRefreshRate: 20
enableMetrics: true
jsCacheSize: 400
doors:
rainbowdashlabs commented 3 years ago

Oh lord...

This is caused by the switch to my new messaging system xD

The fixed version is already on Spigot. Thanks for reporting :3

SlimeDog commented 3 years ago

Confirmed fixed in 2.4.1a My, that was fast.