Getting an error with code please help!

Discussion in 'Plugin Development' started by lewis_hutsby, Mar 5, 2015.

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

    lewis_hutsby

    I have a done /admin plugin like "MCPvP's" plugin and every time I save it I get a huge error and I don't before I save it :/

    Here is the code:
    http://pastebin.com/qUqHkAQt
     
  2. Online

    timtower Administrator Administrator Moderator

  3. @lewis_hutsby A couple of things,
    1. Following up on what @timtower said, what's the error/stack trace you're getting in console? You can't simply tell us, "Something is wrong", and expect us to know what the problem is. Please be a bit more detailed, like saying "this command isn't working...", etc.
    2. You shouldn't store a player in an ArrayList. Store the players UUID for name changes.
    3. Don't return false at the end of a command because the command will just return what you put for the usage in your plugin.yml. Change false to true.
    Hope this helped a little. :)
     
  4. Offline

    lewis_hutsby

    @timtower So, the command is /admin and it vanishes you puts you in gmc then clears your inventory if you do it again whilst in admin mode, it will put you in gms then clears you inventory and then takes you out of vanish, and for some reason that doesn't seem to work, here is the error: http://prntscr.com/6dck6z :)

    Thanks :D
     
  5. Online

    timtower Administrator Administrator Moderator

    @lewis_hutsby Do you happen to have multiple plugins with the same package and the same name for the main class?
    Make the package path project specific.
     
  6. @lewis_hutsby Is more than 1 of your classes extending JavaPlugin? If so, only make your main class extend JavaPlugin.
     
  7. Offline

    lewis_hutsby

    Okay, thanks.
     
  8. @lewis_hutsby Make sure to tahg us so we know that you responded. If your problem is solved, please set this thread to solved by going to Thread Tools > Edit Title > Preifx > Solved. :)
     
  9. Offline

    lewis_hutsby

Thread Status:
Not open for further replies.

Share This Page