Tutorial Make a minigame plugin!

Discussion in 'Resources' started by xTrollxDudex, Aug 15, 2013.

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

    xTrollxDudex

  2. Offline

    bloodless2010

    xTrollxDudex I'm still waiting for the config on this, I really need it.
     
  3. Offline

    xTrollxDudex

    bloodless2010
    I didn't make it for other people to use, I made it with the intention of creating an example.
     
  4. Offline

    bloodless2010

    xTrollxDudex It is not an example if it's non-functional :p
     
  5. Offline

    xTrollxDudex

  6. Looks a lot like how survivalgames is done.
     
  7. Offline

    JPG2000

    Again, your code is awesome.

    I said this before, but I will try to make a better point:

    Your tutorial is awesome, except one bug which isn't that clear, from the OP: The arenas and stuff won't persist through reloads. I know you have an example repo, but if you could include this in your tutorial, it would help alot of people!

    Thanks!
     
  8. Offline

    pokuit

  9. Offline

    JPG2000

    pokuit Sounds epic! Im looking forward to this! <3
     
  10. Offline

    xTrollxDudex

    pokuit
    Why would you have getters for protected fields :p
     
  11. Offline

    pokuit

    xTrollxDudex I think that's probably my old version. I haven't committed and pushed in a few days. Also I'm open to pull requests :)
     
  12. Offline

    xTrollxDudex

  13. Offline

    pokuit

    StaticE
    xTrollxDudex
    if I'm understanding correctly why not just do
    Code:java
    1.  
    2. @Override
    3. public String toString() {
    4. return this.location.toString()+this.location2.toString()+this.location3.toString();
    5. }
    6.  

    Though I guess what I'm saying is there's no real way to not hard code what to return.
    EDIT: Actually with reflection couldn't you just do
    Code:java
    1.  
    2. Field[] fields = YourClassName.class.getDeclaredFields();
    3.  

    Then filter through and make sure the field is public then you can just get the field and list it with a for loop stating the variables name then the field data.
     
  14. Offline

    xTrollxDudex

    pokuit
    Umm what?

    //OFFTOPIC
    I never knew over 2,000 people have viewed this thread 0.0
     
  15. Offline

    pokuit

    Ops sorry I was refrencing
    StaticE

     
  16. Offline

    Ultimate_n00b

    I'll make my own guide later, but basically all arenas are, are a bunch of managers.
    • ArenaManager
    • PlayerManager
    • (for those things) Class Manager
    • RegionManager
    • etc
    People think making arenas are hard, they're actually quite easy when you know how to use OOP correctly.
     
  17. Offline

    xTrollxDudex

  18. Offline

    Ultimate_n00b

    >: D you just inspired me to start
     
  19. Offline

    JPG2000

    xTrollxDudex You made a mistake in the arena manager class.

    You made an empty arraylist, called Arenas, which is suposed to store all of the Arena objects, yet, its empty?
     
  20. Offline

    xTrollxDudex

  21. Offline

    JPG2000

    xTrollxDudex Well, aren't you making a blank ArrayList? How will it store all of the Objects if its blank?
     
  22. Offline

    xTrollxDudex

  23. Offline

    JPG2000

    xTrollxDudex Okay.

    You make an ArrayList, called arenas. You make a comment saying "This is all of the Arena objects". I don't get that. Wouldn't just be an empty ArrayList, since you didn't add anything to it yet?

    xTrollxDudex Do you understand what Im saying? :/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Dec 6, 2015
  24. Offline

    xTrollxDudex

    JPG2000
    That's where they're supposed to be stored
    When I create an arena, that's where I will put it. But if I haven't got any arenas, it would be empty, telling me I need to create arenas both to play in and to store on the list. Get it?
     
    xCyanide likes this.
  25. Offline

    TehVoyager

    xTrollxDudex
    In my plugin, I want just one game object with game states. How would I use game states?
     
  26. Offline

    xTrollxDudex

    TehVoyager
    Use it your single arena object, and have and enum, ex
    PHP:
    public enum GameState {
     
    STARTINGINGAMEEND
     
    }
    PHP:
    GameState g;
    public 
    void setState(GameState gs) {
        
    gs;
    }
     
    public 
    GameState getState() {
        return 
    g;
    }
     
    /*
    * do whatever you want with the state, check it when performing actions
    * set it at specific times with a runnable
    * edit join signs with them
    */
     
  27. Offline

    xTrollxDudex

    Assist
    I know this is a completely inappropriate type of bump (considering that one: I'm bumping my own post and two: it's offtopic)

    But nice sig.
     
    JPG2000 and Assist like this.
  28. Offline

    TehVoyager

    xTrollxDudex
    For your test ArenaPlugin on github mind posting a default config?
     
  29. Offline

    xTrollxDudex

  30. Offline

    calebbfmv

    xTrollxDudex
    Would you show us how we might go about including multiple WorldEdit locations for the locations in createArena?
    I have an idea if you would want me to.
     
Thread Status:
Not open for further replies.

Share This Page