What is wrong there (Mc 1.12.2 plugin)?

ru
- in Plugins
6

I wrote a plugin but I have a bug that I can't understand:

[09:01:52 INFO]: [23SuchtPlugin] Enabling 23Sucht v1.0.1

[09:01:52 ERROR]: Error occurred while enabling 23Sucht v1.0.1 (Is it up to date?)

java.lang.NullPointerException: null

at de.Pierre_Rene_07.Sucht.main.Main.onEnable (Main.java:27) ~ [?:?]

at org.bukkit.plugin.java.JavaPlugin.setEnabled (JavaPlugin.java:264) ~ [server.jar: git-Spigot-dcd1643-e60fc34]

at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin (JavaPluginLoader.java:337) [server.jar: git-Spigot-dcd1643-e60fc34]

at org.bukkit.plugin.SimplePluginManager.enablePlugin (SimplePluginManager.java:403) [server.jar: git-Spigot-dcd1643-e60fc34]

at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin (CraftServer.java:381) [server.jar: git-Spigot-dcd1643-e60fc34]

at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins (CraftServer.java:330) [server.jar: git-Spigot-dcd1643-e60fc34]

at net.minecraft.server.v1_12_R1.MinecraftServer.t (MinecraftServer.java:422) [server.jar: git-Spigot-dcd1643-e60fc34]

at net.minecraft.server.v1_12_R1.MinecraftServer.l (MinecraftServer.java:383) [server.jar: git-Spigot-dcd1643-e60fc34]

at net.minecraft.server.v1_12_R1.MinecraftServer.a (MinecraftServer.java:338) [server.jar: git-Spigot-dcd1643-e60fc34]

at net.minecraft.server.v1_12_R1.DedicatedServer.init (DedicatedServer.java:272) [server.jar: git-Spigot-dcd1643-e60fc34]

at net.minecraft.server.v1_12_R1.MinecraftServer.run (MinecraftServer.java:545) [server.jar: git-Spigot-dcd1643-e60fc34]

at java.lang.Thread.run (Thread.java:748) [?: 1.8.0_282]

Can somebody help me?

Da

Most often, these errors occur when a version is incorrect.

What version of the game are you playing on?

ru

I play on the 1.12.2

ru

If I remove the command it works.

getCommand ("setspawn"). SetExecutor (new SetSpawnCommand ());

Da

Could it be that you wrote a command that points to a non-existent variable?

ru

Found it and wrote "command" in the plugin.yml instead of "commands"

Da

Nice that you were able to solve the problem. Good luck with the rest of the programming of your mod.