Util *BROKEN* *PLEASE READ* Create a Minigame!

Discussion in 'Resources' started by JPG2000, Nov 11, 2013.

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

    JPG2000

    xTrollxDudex likes this.
  2. Offline

    xTrollxDudex

    I vote you.
     
  3. Offline

    JPG2000

  4. Offline

    Ultimate_n00b

    JPG2000 likes this.
  5. Offline

    zakkinu2

    JPG2000 Nice tutorial, I havent seen a video on youtube or something how to make an arena plugin, Im just asking if you can make one it will help a lot of people even though this alone already does but if you explain it on the video it would be better, You dont have to but im just asking, it will help a lot.

    JPG2000 your tutorials on your signature are like all my anwsers to what i always wanted to know about plugin development! Thanks a lot.

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

    JPG2000

    zakkinu2 Haha. Thats awesome, thanks. I actually have like 3 more tutorials but it won't show :p

    And I'll thick about a video, probably not though, since I don't want to get into Youtube, and since @Pogostick29dev already has a series (Two, actually) about making a Minigame.
     
  7. Offline

    zakkinu2

    JPG2000 oh ok i was just asking, its fine.
     
    JPG2000 likes this.
  8. Offline

    PieMan456

    JPG2000
    I'm sorry this is a stupid question but at the bottom at the ArenaManager how would I save it. I am not good at configuration files and things like that.
     
  9. Offline

    JPG2000

    PieMan456 You mean save the config? If using the default one from java plugin, make a method that does saveConfig(). If not, look at your custom configuration code.
     
  10. Offline

    PieMan456

    JPG2000
    When I use saveConfig() it comes up wrong.
     
  11. Offline

    CookieGamer100

    How would I make it so a player dosn't have to type /ffa leave (arenaname) just /ffa leave I just have the default code nothing majer has been changed
     
  12. Offline

    JPG2000

    CookieGamer100 You can loop through the arenas, if one of them contains the player, leave:
    Code:java
    1. if (commandLabel.equalsIgnoreCase("leave") {
    2.  
    3. Player player = (Player) sender;
    4.  
    5. for (Arena a: Arena.arenaObjects) { //Loop
    6.  
    7. if (a.getPlayers().contains(player.getName()) {//If an arena contains player
    8. ArenaManager.getManager().removePlayer(a); //Remove him/her
    9. }
    10. }
     
    CookieGamer100 and bennie3211 like this.
  13. Offline

    CookieGamer100

    Thanks also this is like the only Minigame plugin tut that dosn't have any errors :) Got all configs working :D

    When I try to join a arena it dosn't work throws a NPE
    In the NPE it says something to do with line 54 which is when you add a player and it tps you to the joinlocation
    Main Class http://pastebin.com/qnzMCkv6
    ArenaManager Class http://pastebin.com/4hS9VQ1c
    And nothing is changed in the Arena class

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

    JPG2000

    CookieGamer100 Could you send me the NPE? Maybee a private message would be nice, so it can be more 1 on 1.
     
  15. Offline

    CookieGamer100

    bug1.JPG
     
  16. Offline

    zakkinu2

    JPG2000 Ok if i wanted to create an arena what did i have to do?
     
  17. Offline

    JPG2000

    zakkinu2 You would have to create an Arena object with the properties you want (fields) then set it in the config. I may make a method for this..
     
  18. Offline

    zakkinu2

    JPG2000 likes this.
  19. Offline

    Legocowchaser

    JPG2000 I like this tutorial, thanks. I have a problem though. "When I type player.setHealth(player.getMaxHealth());" it says "The method getMaxHealth() is ambiguos for the type Player" What is an example I would type for "FileConfiguration fc = null;" what could I type instead of null? For "

    fc.set(path "startX", startLocation.getX());
    fc.set(path "startY", startLocation.getY());
    fc.set(path "startZ", startLocation.getZ());

    and

    fc.set(path, "endX", endLocation.getX());
    fc.set(path, "endY", endLocation.getY());
    fc.set(path, "endY", endLocation.getZ());

    I also get errors. Please help thanks.:)
     
  20. Offline

    JPG2000

    Legocowchaser

    For your first issue, your craft bukkit build may be out of date or something. Change that to 20.

    For second issue, you need a custom configuration. Google is your friend on that part.
     
  21. Offline

    Legocowchaser

    JPG2000 Ok that fixed my first problem thanks. When you talked about the config does that mean I have to type the whole config section differently than the tutorial? Thanks
     
  22. Offline

    JPG2000

    Legocowchaser No.

    All you have to do is get a config, and when ever I do 'fc' replace that with your configuration.
     
  23. Offline

    CookieGamer100

    If you're a noob/learning like me I replaced the null with Bukkit.getServer().getPluginManager().getPlugin("Pluginname here").getConfig(); something like that then
    Bukkit.getServer().getPluginManager().getPlugin("Pluginname here").saveConfig(); to save it
     
  24. Offline

    lewysryan

    how would i actually create the arena? like a command /arenacreate JPG2000
     
  25. Offline

    PieMan456

    JPG2000
    Hey in your tutorial a lot of things come up yellow down at the bottom of the ArenaManager. Are we supposed to do anything?
     
  26. Offline

    Legocowchaser

    JPG2000 CookieGamer100 Thanks that fixed those problems but now

    Location joinLocation = new Location(world, joinX, joinY, joinZ);
    Location startLocation = new Location(world, startX, startY, startZ);
    Location endLocation = new Location(world, endX, endY, endZ);
    int maxPlayers = fc.getInt("arenas." + keys + ".maxPlayers");
    Arena arena = new Arena(keys, joinLocation, startLocation, endLocation, 17);
    Arena arena = new Arena(arenaName, joinLocation, startLocation, endLocation, maxPlayers);

    error: "The value of the local variable ____ is not used"
     
  27. Offline

    lewysryan

    anyone figured out the config? please JPG2000 could i have an example // tut on how to do it.

    p.s:

    would you have to manually add the start points and all to the config ??? (does not matter, just need to know how i would set an arena up)
     
  28. Offline

    JPG2000

    lewysryan You would have to set all of the points up. I would recommend a method, I'll update the post today or tomorrow.
     
  29. Offline

    5scb8

    @JPG2000 can you plz show how to create a arena ? ArenaManager.(what ever else is needed)
     
  30. Offline

    lewysryan

    5scb8 if you read his post JPG2000 right above you he is kindly going to update this today // tomorrow :D
     
Thread Status:
Not open for further replies.

Share This Page