Solved Solved || Name needed for new topic

Discussion in 'Plugin Help/Development/Requests' started by Lightspeed, Apr 7, 2015.

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

    Lightspeed

    I've been sitting here for months to the point if anyone gives me/helps me alot on this and has mc I will op them. I need help with: Title ^
     
  2. Invisible

    nverdier

    @Lightspeed Most developers don't really care about getting OP or a rank, so it's not really a thing I wouldn't recommend advertising that to get help.
     
  3. Offline

    Lightspeed

    EH idc if they want it or not they can have it :p If they will help me dev a plugin
     
  4. Offline

    BladeFireTurtle

    I'm sorry, but I don't think you've given enough information. I have no idea what you're asking to be done I'm afraid.
     
  5. Offline

    Lightspeed

    I just need the start of a big plugin like essentials so I can create many classes
    WHat else do you need? anything else
     
  6. Invisible

    nverdier

    @Lightspeed How to start: Create a class extending JavaPlugin.
     
  7. Offline

    BladeFireTurtle

    Have you had experience making plugins in the past? Are you simply asking how multi-class plugins are made?
     
  8. Offline

    Lightspeed

    I need to create a huge multi class plugin I try many times but they have errors or dosen't work :c
     
  9. Offline

    BladeFireTurtle

    Are you able to make more simple plugins? My concern is that you are jumping ahead and trying to make the really cool plugins without first practicing on simpler ones. I would personally shelve any plans for massive essentials type plugins and get more practice. I know this is not what you want to hear but I feel this is the only way:(
     
  10. Offline

    Lightspeed

    Yes I can create a simple plugin but, I ened more for my server and I got no devs

    i didn't want to get devs but, it's the only option right now :c
    ALl i Want is so I can have many command classes like essentials and how they have it setup with teh supers

    @BladeFireTurtle Ima prob get a few devs :\

    @BladeFireTurtle @nverdier Ok ok ok ok ok ok Im done with this but, how about this?
    Can you help me make this code smaller?
    Code:
    if (exp >= 6 && exp < 12)
                    {
                        p.setMaxHealth(21);
                    }
                    else if (exp >= 12 && exp < 18)
                    {
                        p.setMaxHealth(22);
                    }
                    else if (exp >= 18 && exp < 24)
                    {
                        p.setMaxHealth(23);
                    }
                    else if (exp >= 24 && exp < 30)
                    {
                        p.setMaxHealth(24);
                    }
                    else if (exp >= 30 && exp < 36)
                    {
                        p.setMaxHealth(25);
                    }
                    else if (exp >= 36 && exp < 42)
                    {
                        p.setMaxHealth(26);
                    }
                    else if (exp >= 42 && exp < 48)
                    {
                        p.setMaxHealth(27);
                    }
                    else if (exp >= 48 && exp < 54)
                    {
                        p.setMaxHealth(28);
                    }
                    else if (exp >= 54 && exp < 60)
                    {
                        p.setMaxHealth(29);
                    }
                    else if (exp >= 60 && exp < 66)
                    {
                        p.setMaxHealth(30);
                    }
                    else if (exp >= 66 && exp < 72)
                    {
                        p.setMaxHealth(31);
                    }
                    else if (exp >= 72 && exp < 78)
                    {
                        p.setMaxHealth(32);
                    }
                    else if (exp >= 78 && exp < 84)
                    {
                        p.setMaxHealth(33);
                    }
                    else if (exp >= 84 && exp < 90)
                    {
                        p.setMaxHealth(34);
                    }
                    else if (exp >= 90 && exp < 96)
                    {
                        p.setMaxHealth(35);
                    }
                    else if (exp >= 96 && exp < 102)
                    {
                        p.setMaxHealth(36);
                    }
                    else if (exp >= 102 && exp < 108)
                    {
                        p.setMaxHealth(37.0);
                    }
                    else if (exp >= 108 && exp < 114)
                    {
                        p.setMaxHealth(38.0);
                    }
                    else if (exp >= 114 && exp < 120)
                    {
                        p.setMaxHealth(39.0);
                    }
                    else if (exp >= 120)
                    {
                        p.setMaxHealth(40.0);
                    }
    Pls this hurts my eyes
    this is one class just to make my survival world for people fun and intresting

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
  11. Invisible

    nverdier

    @Lightspeed Well are you using an algorithm to determine the values you are putting there? If so, you can do it programmatically.
     
  12. Offline

    Lightspeed

    @nverdier No . . . I just need it every 6 exp they get half a heart
     
  13. Invisible

    nverdier

  14. Offline

    Lightspeed

    What does that do I'm sorry I was tired when I read the java tutorials or help with that in it.
    Yes I was to understand java better don't judge me :I
     
  15. Offline

    BladeFireTurtle

    If I understand correctly this may work:

    Code:
    int healthToAdd = Math.floor(exp/6);
    int startingHealth = 20; //I'm assuming from your above code that you are starting at 20
    p.setMaxHealth(startingHealth + healthToAdd);
    / means divide.
     
    Last edited by a moderator: Apr 7, 2015
  16. Offline

    Lightspeed

    Ok thank you because therse to divide key on keyboards/my keyboard and I Don't now how they added the stuff like this in java \" <--- like that or somthing near that
    EDIT: oops :p
     
  17. Invisible

    nverdier

  18. Offline

    BladeFireTurtle

    I highly recommend you start the Java tutorials again or get some server devs.
     
    nverdier likes this.
  19. Invisible

    nverdier

    Lightspeed likes this.
  20. @Lightspeed I'd hard to motivate yourself, but you would end up greatly appreciating learning Java before throwing yourself into the Bukkit API. You should start from the beginning in Java if you aren't aware +, - , *, /, %, etc. are considered operators. Those simple operators will shorten up your code greatly.
     
  21. Offline

    Lightspeed

    Thank You @BladeFireTurtle.
    New:: How can I create a command system like this or use somthing in bukkit
    to do
    Code:
    public AchievementCommand()
      {
        super("achievement");
        this.description = "Gives the specified player an achievement or changes a statistic value. Use '*' to give all achievements.";
        this.usageMessage = "/achievement give <stat_name> [player]";
        setPermission("bukkit.command.achievement");
      }
    
      public boolean execute(CommandSender sender, String currentAlias, String[] args)
      {}
    essentials does this
    This is the start of vanillas Achievment command
     
  22. Offline

    BladeFireTurtle

    So you basically want to write a command to set a specified player as having done a vanilla achievement?
     
  23. Offline

    Lightspeed

    No creating a command system setup like essentials and that
     
  24. Offline

    BladeFireTurtle

    So you're basically asking how to make commands in general?
     
  25. Offline

    Lightspeed

    I know the normal command system I would like one like essentials wich is like the one that I put above @BladeFireTurtle
     
  26. Invisible

    nverdier

  27. Offline

    Lightspeed

    Oh yeah sorry I forgot about that one :p
     
Thread Status:
Not open for further replies.

Share This Page