Peer Review - How does this look so far?

Discussion in 'Plugin Development' started by nala3, Nov 23, 2013.

?

How do things look?

  1. Great, I didn't see any issues

    0 vote(s)
    0.0%
  2. Pretty good, a couple problems though

    1 vote(s)
    100.0%
  3. Ehh, more than a few things wrong

    0 vote(s)
    0.0%
  4. Woah. Stop. You got some serious issues here.

    0 vote(s)
    0.0%
Thread Status:
Not open for further replies.
  1. Offline

    nala3

    I just re-wrote my plugin NoItem because every other version I have made so far I just didn't find satisfactory. It always got so convoluted and confusing with all the different things I was trying to implement that bugs where many, hard to track down, and even harder to fix.

    This time around, I approached things very differently and am trying to keep up on writing unit tests, keep the code clear and readable, and easy to extend. However, I still think it's a good idea to have some other people look over my work and see if there is anything obvious I screwed up and to keep the bugs to a minimum in the (fairly) early stages. So if you would like to help me out and check my work for possible issues, I would really appreciate it.

    Here is the source: https://github.com/nala3/Noitem4
    The repo wiki has some basic documentation for a little insight on how the plugin works.
     
  2. Offline

    1Rogue

    My immediate knee-jerk reaction is to tell you to stop using singletons.

    Other than that, it seems fairly well put together.
     
  3. Offline

    xTrollxDudex

    nala3
    I prefer to put listeners in a different package
     
  4. Offline

    nala3

    I do admit one was improperly used in my case and is now removed (ConfigManager). But there should never be more than one instance of the main plugin class anyway so I think that is an acceptable case, even if it is just for ease of access.

    xTrollxDudex ehh, I do if there is more than one listener class, but in this case there is a single class.
     
  5. Offline

    xTrollxDudex

    nala3
    There is only one exception class. And it's in it's own package.
     
  6. Offline

    nala3

    That's an... exception (don't judge my pun).
     
    TeeePeee likes this.
  7. Offline

    amhokies

    nala3
    I think a better way of getting an instance of your Plugin class would be to return Bukkit.getPluginManager().getPlugin("NoItem") from your getInstance method instead of storing the instance inside the class itself.
     
  8. Offline

    nala3

    You have a point, then I would have to cast it to my main class to make all my methods accessible again.
     
  9. Offline

    amhokies

    Well you could just cast it inside of your getInstance method, then return it as that, instead of casting it when you call the getInstance method from elsewhere.
     
  10. Offline

    nala3

    That's what I did :p Ain't nobody got time for the casting nonsense all the time.
     
    amhokies likes this.
  11. Offline

    xTrollxDudex

    Exemption*
     
    nala3 likes this.
  12. Offline

    nala3

Thread Status:
Not open for further replies.

Share This Page