[JAVA] Minecraft SMP plugin isn't loading.

Roon

Member
Mar 31, 2013
60
9
So, I'm making a Minecraft plugin which.. basically. When you click with a stick, it creates an explosion. When you click with a bone it shoots lightning. However, the plugin isn't working.
In the server console it shows the [BBBC] Enabling BBBC v1.0 then [BBBC] BBBC Activated!
But when I click with a stick/bone nothing happens.
I even have it set to broadcast a message to everyone. Even this doesn't work.



(This includes 3 files, MyPlayerListener.java, plugin.yml and bbbc.java)

Thanks in advance.
 

Quackster

a devbest user says what
Aug 22, 2010
1,765
1,245
You haven't registered the class which implements Listener. Go to onEnable() and add

Code:
this.getServer().getPluginManager().registerEvents(new MyPlayerListener());

Hope that helps. :)
 

Roon

Member
Mar 31, 2013
60
9
You haven't registered the class which implements Listener. Go to onEnable() and add

Code:
this.getServer().getPluginManager().registerEvents(new MyPlayerListener());

Hope that helps. :)

Seemed to make Bukkit question whether the plugin is up to date or not.
06:16:55 [SEVERE] Error occurred while enabling BBBC v1.0 (Is it up to date?)
java.lang.NullPointerException
at org.bukkit.plugin.SimplePluginManager.registerEvents(SimplePluginManager
at me.Brandon.bbbc.bbbc.onEnable(bbbc.java:17)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.ja
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.j
at org.bukkit.craftbukkit.v1_6_R2.CraftServer.loadPlugin(CraftServer.java:2
at org.bukkit.craftbukkit.v1_6_R2.CraftServer.enablePlugins(CraftServer.jav
at net.minecraft.server.v1_6_R2.MinecraftServer.l(MinecraftServer.java:313)
at net.minecraft.server.v1_6_R2.MinecraftServer.f(MinecraftServer.java:290)
at net.minecraft.server.v1_6_R2.MinecraftServer.a(MinecraftServer.java:250)
at net.minecraft.server.v1_6_R2.DedicatedServer.init(DedicatedServer.java:1
at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:39
at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
 

Users who are viewing this thread

Top