[WIP] Nations --- For active PVP [Devs wanted!]

Discussion in 'WIP and Development Status' started by jwa1, Apr 24, 2014.

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

    MadusU

    This looks pretty interesting. I am not a very good programmer either. But I would like to contribute, as this plugin could be a great alternative to factions and towny.
    jwa1
    EDIT: Are we supposed to use UUID's or player names to store data. I read some of that code and it looks like it uses player names. I would say we should use UUID's, to support name changing.
     
  2. Offline

    mythbusterma

    What's a good place to talk to you guys about the plugin? It needs some work.....
     
  3. Offline

    jwa1


    As said before: IRC channel
     
  4. Offline

    Apple_

    I'd love to join in on the development, currently developer at twitter.com/JACGaming
     
  5. Offline

    MadusU

    Sorry I haven't used IRC before. if I write something, and you login three hours later. Can you then see what I wrote, or do we hav to be online at the same time?
     
  6. Offline

    mythbusterma


    No Madus, as soon as it's sent on IRC, as long as no-one is listening in or logging it, it is deleted.

    Also, if you guys could be on the chat tomorrow, I have some pretty big changes I think you guys will like, so please try and be on.
     
  7. Online

    timtower Administrator Administrator Moderator

    Time is relative on this forum, as timezones also shift
     
    AdamQpzm likes this.
  8. Offline

    mythbusterma


    Thanks Tim, I'll remember that.
     
  9. Offline

    MadusU

    I looked at the source earlier, and might not remember everything correct. You use a hashmap to store which nation a player belongs to. You use a String as key. It should be UUID to support name changing. It has to be changed now as it will be a pain to change it later in the progress. And the value is a NationType, does that mean that everything about the Nation gets saved for every player? I don't know since NationType is an Enum. And I don't know what an enum is (please explain to me or send a link). I will look into the traits, and hopefulle have made atleast to by Sunday.
    I live in UTC+1 (Sweden, Germany and France are in this Timezone)
     
  10. Online

    timtower Administrator Administrator Moderator

    MadusU Enum is an very easy way to define loads of the same things without have hundreds of classes ( Material is also an enum )
     
    MadusU likes this.
  11. Offline

    MadusU

    Does that mean that it only saves one instance of every NationType, and then in the hashmap it is a reference to that NationType?
     
  12. Online

    timtower Administrator Administrator Moderator

    I don't know the code of this plugin nor am I taking the effort to take a look
     
    AdamQpzm likes this.
  13. Offline

    MadusU

    Thanks for the help. I hope another person will answer it
     
    timtower likes this.
  14. Offline

    jwa1

    If you join the IRC channel we’ll have a chat.
     
  15. jwa1 Surely posting here will ensure he can read it anytime, and it would answer the question if anyone else who reads the thread has the same one?
     
  16. Offline

    MadusU

    We had a chat and this is the summary. The HashMap that stores player names and their nation. Is just a reference to the NationType, because it is an enum (I got some information about enum explained) I told jwa1 to use UUID to store player data. And sent him some information about it, since he did not know how to use it.
    But yeah we should keep the information in hoe thread, for everyone to see. But as IRC can be more handy, we can post summaries.
     
  17. Offline

    mythbusterma

    I'm already going to be switching it so that if the Bukkit version supports .getUUID() for players, it will use it to keep track of the players instead of their names, you should read the comments I put in the code.
     
  18. Offline

    MadusU

  19. Offline

    mythbusterma

  20. Offline

    MadusU

    Sorry, i have no idea how good (or bad) oyu and the others are. I was just trying to help.
     
  21. Offline

    jwa1

  22. Offline

    Obnoxious_Ninja

    Hey, I don't know if you guys still need help, but I'd be willing to offer what services I can provide.
     
  23. Offline

    jwa1


    Yes, any help will be appreciated.
     
  24. Offline

    Obnoxious_Ninja

    Is there a convo to discuss this, or just this thread? What do you need to be done?
     
  25. Offline

    jwa1

    The IRC channel is the most useful way of communicating and there's a to-do list in the first post or on the Github page.
     
    Obnoxious_Ninja likes this.
  26. Offline

    Iroh

    Moved WIP and dev status.
     
  27. Offline

    AoH_Ruthless

    Was looking at your GitHub: for your singleton class, you should really not use static methods.
     
  28. Offline

    jwa1

    My what class?
     
  29. Offline

    AoH_Ruthless

    jwa1
    I was talking about your Nation class. Most of your methods are not pure functions[1] and using static modifiers completely decimate the testability, modularity and flexibility. While static methods are procedural oriented, they make testing much more difficult, and this is important because it looks like this class is the backbone of your plugin. Personally, I really mostly only use static methods for utilities, such as a ConfigUtils or something like that.

    Static modifiers really limit you. What if you want to override methods in a derived class? You can't do that with static identifiers. While you were right in the fact that one important purpose of a static method is to exert control over instantiation and limit resource access (like in databases), you want to be able to instantiate your Nation class so you can prevent any bugs that might occur due to the global form of static. They are also pretty annoying because to provide reference to any static method, you need some sort of wrapper which gets to be tedious and makes your code look ugly.

    [1] A pure function is one that "performs a [function] with no observable side effects, and its result only depends on its arguments"
     
  30. Offline

    jwa1

    Hello! It's been quiet around this plugin for a while now but I'd like to pick this project up again. With new Minecraft versions coming out every other week it seems, it would be good to bump UUID support to the top of the to-do list.
     
Thread Status:
Not open for further replies.

Share This Page