Plugin not loading?

th
- in Plugins
12

I have programmed a plugin and a command does not work.

The console shows this:

Error occurred while enabling RushPVP v1.0 (Is it up to date?)

java.lang.NullPointerException

at de.Kalio.rushpvp.main.Main.onEnable (Main.java:13) ~ [?:?]

at org.bukkit.plugin.java.JavaPlugin.setEnabled (JavaPlugin.java:321) ~ [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin (JavaPluginLoader.java:340) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at org.bukkit.plugin.SimplePluginManager.enablePlugin (SimplePluginManager.java:405) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin (CraftServer.java:357) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins (CraftServer.java:317) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at org.bukkit.craftbukkit.v1_8_R3.CraftServer.reload (CraftServer.java:741) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at org.bukkit.Bukkit.reload (Bukkit.java:535) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at org.bukkit.command.defaults.ReloadCommand.execute (ReloadCommand.java:25) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at org.bukkit.command.SimpleCommandMap.dispatch (SimpleCommandMap.java:141) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand (CraftServer.java:641) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchServerCommand (CraftServer.java:627) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at net.minecraft.server.v1_8_R3.DedicatedServer.aO (DedicatedServer.java:412) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at net.minecraft.server.v1_8_R3.DedicatedServer.B (DedicatedServer.java:375) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at net.minecraft.server.v1_8_R3.MinecraftServer.A (MinecraftServer.java:654) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

at net.minecraft.server.v1_8_R3.MinecraftServer.run (MinecraftServer.java:557) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar: git-Spigot-db6de12-18fbb24]

Can someone help me?

Sn

Take a look at code line 13. Since the errorlog says yes, there's a null pointer exception

Ap

NullPointerException in class Main, line 13

th

Something is wrong: public void onEnable () {

getCommand ("heal"). SetExecutor (new HealCommand ());

th

Is there something wrong? : public void onEnable () {

getCommand ("heal"). SetExecutor (new HealCommand ());

Ap

Did you also register the command in your plugin.yml?

th

Yes, I entered it there: command:

heal:

description: This command heals you!

and also with the space bar 3x

Ay

Have you entered the command 'heal' in the plugin.yml?

Ay

The path should be 'commands'. I don't think 'command' works.

Ap

Correctly

Ap

Commands: not command

th

Thanks now!

Sn

Did you also register the command "heal" in the plugin.yml?