Basic Plugin Help

Discussion in 'Plugin Development' started by GalaxyPhoenix20, Jun 20, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    GalaxyPhoenix20

    Hello, recently I started coding my own plugins. This is my first complex plugin i have made. IT is basically a plugin that allows you to do /ab and the admin brodcast appears saying something like server restating in 5 seconds. The plugin is reaching the server fine, but the commands are not working. Any ideas? Thanks!

    http://pastebin.com/GJhWgLri This is the main.java file.

    http://pastebin.com/bYr6GeiE this is our plugin.yml file. It isn't finished yet, mostly because we don't know what do do and it is out problem. Any help is appreaciated. Thanks.
     
  2. Offline

    NoLiver92

    You dont have onEnable() or onDisable() in your file, also you may want to implement CommandExecutor as well
     
  3. Offline

    es359


    He doesn't have to implement CommandExecutor if the command is in the Main class.
     
  4. Offline

    TechNotes


    And you don't really need an onEnable() or onDisable() if you don't need to do anything in them.

    Also, instead of using equalsIgnoreCase for your integers (which is a VERY bad idea), you should parse an int out of the argument the player specified, like this:

    Code:java
    1. int foo = Integer.parseInt("1234");


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  5. Offline

    GalaxyPhoenix20

    Awesome. Got it working. Thanks everyone.
     
Thread Status:
Not open for further replies.

Share This Page