I'm creating a bukkit plugin, but I'm having a few issues. I have everything setup, but I'm having a bit of trouble with the "main" part. I've looked at many tutorials, but none of them seem to help me. I'm trying to figure out what to put in for the main class file. I've used my email as in: com.hotmail.myemail.myplugin1 (myemail represents my email name, myplugin1 is the name of the plugin). This is the error message that I receive when loading up my hamachi server:
[18:40:09 ERROR]: Could not load 'plugins\myplugin1.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: Cannot find main class 'com.hotmail.myemail.myplugin1'
Anyone help/suggestions are greatly appreciated! Thank you!
[18:40:09 ERROR]: Could not load 'plugins\myplugin1.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: Cannot find main class 'com.hotmail.myemail.myplugin1'
Anyone help/suggestions are greatly appreciated! Thank you!
3
I figured it out, i needed to put the package into the main. Thanks for your help!
Lets say I have a plugin called Nigulp. I made the class NigulpPlugin in the package, com.gmail.matthewholt3.nigulp.
The path for main would be: com.gmail.matthewholt3.nigulp.NigulpPlugin
The last bit isn't the name of your plugin, but the name of the class which extends JavaPlugin.
EDIT: Here's an example.
Package Explorer looks like this:

The plugin.yml would look like this:
The path for main would be: com.gmail.matthewholt3.nigulp.NigulpPlugin
The last bit isn't the name of your plugin, but the name of the class which extends JavaPlugin.
EDIT: Here's an example.
Package Explorer looks like this:

The plugin.yml would look like this:
name: Chatter
version: 1.0.4
description: A plugin that manipulates the chat messages.
author: Matthew Holt
main: tk.goldbutterknife.chatter.Chatter
depend: [Vault]
commands:[...]
permissions:[...]
I'm still having the same issue, here's what my plugin.yml looks like:
name: myplugin1
version: 1.0
description: This is my first plugin.
author: kirby1699
main: tk.kirby1699.myplugin1.MyPlugin1
commands:
test:
description: Tests if the plugin works
hello:
description: hello!
(The 3 spaces in front of "test" and "hello" are there, and the 6 spaces in front of description are also there. They aren't showing up for some reason)
name: myplugin1
version: 1.0
description: This is my first plugin.
author: kirby1699
main: tk.kirby1699.myplugin1.MyPlugin1
commands:
test:
description: Tests if the plugin works
hello:
description: hello!
(The 3 spaces in front of "test" and "hello" are there, and the 6 spaces in front of description are also there. They aren't showing up for some reason)
