Hello, I just tried my hand at this stuff by making a gamemode changing plugin, for now i just made it to change your gamemode to creative when you type gm 1. Now.. I didn't see any problems, but when i exported it, it gave a weird error. The problems i think i have are: 1) Package, file, yml, and class naming. 2) Code error. Here is my code: http://pastebin.com/zEwGWdQn Here is my plugin yml: Code: author: LordSaad44 description: TerraMC commands and utilities. main: me.lordsaad44.plugins.terramc.Terramc name: TerraMC version: '1.0' And here is my... explorer thingy: http://prntscr.com/2za868 Soo.. Where is the error?
megasaad44 You have to give us the error. Otherwise we can't tell you what's your mistake You have to remove the ' from your version!
megasaad44 It seems that you haven't described the path to your plugins main class correctly. So change the main to me.LordSaad44.terramc.Terramc The main property is case sensitive!
GameplayJDK GalaxyBeatzz http://prntscr.com/2zajie The plugin was enabled with no error on the console, but gm 1 didn't work .-. unknown command, no errors.
GameplayJDK GalaxyBeatzz No. I was just curios xP Thought it might help or something. http://prntscr.com/2zamxx NEW error http://prntscr.com/2zan6v explorer NEW plugin.yml: Code: author: LordSaad44 description: TerraMC commands and utilities. main: me.LordSaad44.terramc.Terramc name: TerraMC version: 1.0
megasaad44 I have to correct myself.. So change the main again, and now to me.LordSaad44.terramc.Terramc.Terramc When I say "main" I mean the main property in the plugin.yml file, not the package
GameplayJDK ... Explain more please ._. Which is the property? Do you mean the yml? Do you mean in the code? Really sorry, i admit i'm slow...
No problem: By saying "main-property" I basically mean the line with "main: package.mainclassname" in it. The "package" is the "me.LordSaad44.terramc.Terramc" thing in your file explorer. But you have to append the name of your plugins main class, in your case "Terramc" to it. So just change your plugin.yml content to the following: Code: author: LordSaad44 description: TerraMC commands and utilities. main: me.LordSaad44.terramc.Terramc.Terramc name: TerraMC version: 1.0
GameplayJDK Unknown command T u T No error.... Bump. Plugin doesn't do anything xD EDIT by Moderator: merged posts, please use the edit button instead of double posting.
megasaad44 You havn't registered your command in onEnable or plugin.yml Thats probley why it's giving Unknown command.
megasaad44 Code: author: LordSaad44 description: TerraMC commands and utilities. main: me.LordSaad44.terramc.Terramc.Terramc name: TerraMC version: 1.0 commands: gm: description: Change your gamemode!