Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when typing commands after deleting the locales folder and trying to /bbox reload #385

Closed
Poslovitch opened this issue Dec 15, 2018 · 0 comments
Assignees
Milestone

Comments

@Poslovitch
Copy link
Member

Poslovitch commented Dec 15, 2018

Description

>bbox reload
[10:52:00 INFO]: Type command again within 10s to confirm
>bbox reload
[10:52:02 WARN]: [BentoBox] Task #23 for BentoBox v0.17.0-SNAPSHOT generated an exception
java.lang.NullPointerException: null
        at world.bentobox.bentobox.managers.LocalesManager.get(LocalesManager.java:62) ~[?:?]
        at world.bentobox.bentobox.managers.LocalesManager.get(LocalesManager.java:52) ~[?:?]
        at world.bentobox.bentobox.api.user.User.getTranslation(User.java:232) ~[?:?]
        at world.bentobox.bentobox.api.user.User.sendMessage(User.java:267) ~[?:?]
        at world.bentobox.bentobox.commands.BentoBoxReloadCommand.reloadLocales(BentoBoxReloadCommand.java:42) ~[?:?]
        at world.bentobox.bentobox.commands.BentoBoxReloadCommand.lambda$execute$0(BentoBoxReloadCommand.java:32) ~[?:?]
        at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:391) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:893) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:417) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:835) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:733) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]

Steps to reproduce the behavior:

  1. Run a clean install
  2. Wait for the server to be fully loaded
  3. Type /bbox reload, or /bbox v - to make sure it is working
  4. Delete the locales folder
  5. Type /bbox reload - NPE
  6. Type /bbox v - NPE
    Note that typing /bbox v before /bbox reload will result in this command working fine (see Additionnal context.

Expected behavior
NPEs shouldn't happen. I was expecting the locales folder to be regenerated.

Server Information:

  • Database being used: YAML
  • OS: Windows 10 x64
  • Java Version: 8u192
  • BentoBox version: current with the develop branch (7dd06b9)
  • Addons installed?
[10:56:53 INFO]: Bentobox version: 0.17.0-SNAPSHOT
[10:56:53 INFO]: Loaded Game Worlds:
[10:56:53 INFO]: BSkyBlock_world (BSkyBlock)
[10:56:53 INFO]: Loaded Add-Ons
[10:56:53 INFO]: BSkyBlock 0.5.0-SNAPSHOT
  • Other plugins?
    Plugins (5): LuckPerms, Vault, PlaceholderAPI, BentoBox, Essentials

Additionnal context
Here are the logs I got after deleting the locales folder. We can see that /bbox v works fine until I'm trying to reload BentoBox.

>bbox v
[10:58:22 INFO]: Bentobox version: 0.17.0-SNAPSHOT
[10:58:22 INFO]: Loaded Game Worlds:
[10:58:22 INFO]: BSkyBlock_world (BSkyBlock)
[10:58:22 INFO]: Loaded Add-Ons
[10:58:22 INFO]: BSkyBlock 0.5.0-SNAPSHOT
>bbox reload
[10:58:25 INFO]: Type command again within 10s to confirm
>bbox reload
[10:58:26 WARN]: [BentoBox] Task #20 for BentoBox v0.17.0-SNAPSHOT generated an exception
java.lang.NullPointerException: null
        at world.bentobox.bentobox.managers.LocalesManager.get(LocalesManager.java:62) ~[?:?]
        at world.bentobox.bentobox.managers.LocalesManager.get(LocalesManager.java:52) ~[?:?]
        at world.bentobox.bentobox.api.user.User.getTranslation(User.java:232) ~[?:?]
        at world.bentobox.bentobox.api.user.User.sendMessage(User.java:267) ~[?:?]
        at world.bentobox.bentobox.commands.BentoBoxReloadCommand.reloadLocales(BentoBoxReloadCommand.java:42) ~[?:?]
        at world.bentobox.bentobox.commands.BentoBoxReloadCommand.lambda$execute$0(BentoBoxReloadCommand.java:32) ~[?:?]
        at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:391) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:893) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:417) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:835) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:733) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]
>bbox v
[11:00:55 WARN]: Unexpected exception while parsing console command "bbox v"
org.bukkit.command.CommandException: Unhandled exception executing 'bbox v' in world.bentobox.bentobox.commands.BentoBoxCommand(bentobox)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:146) ~[spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchCommand(CraftServer.java:702) ~[spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchServerCommand(CraftServer.java:687) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at net.minecraft.server.v1_13_R2.DedicatedServer.aU(DedicatedServer.java:459) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:418) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:835) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:733) [spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]
Caused by: java.lang.NullPointerException
        at world.bentobox.bentobox.managers.LocalesManager.get(LocalesManager.java:62) ~[?:?]
        at world.bentobox.bentobox.managers.LocalesManager.get(LocalesManager.java:52) ~[?:?]
        at world.bentobox.bentobox.api.user.User.getTranslation(User.java:232) ~[?:?]
        at world.bentobox.bentobox.api.user.User.sendMessage(User.java:267) ~[?:?]
        at world.bentobox.bentobox.commands.BentoBoxVersionCommand.execute(BentoBoxVersionCommand.java:31) ~[?:?]
        at world.bentobox.bentobox.api.commands.CompositeCommand.execute(CompositeCommand.java:237) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:139) ~[spigot-1.13.2.jar:git-Spigot-e769fe4-5f5a676]
        ... 7 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants