Help!

Discussion in 'Plugin Development' started by PizzaPixel, Mar 24, 2014.

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

    PizzaPixel

    @MrInspector how would i make an xp countdown
     
  2. Offline

    ShadowLAX

    PizzaPixel Create a new BukkitRunnable and define the integer x within it. For every player you are making the countdown for, set there xp level to int x. Then, have the BukkitRunnable loop once every 20 ticks (1 second, changeable). When x is equal to 0, cancel the BukkitRunnable, set there xp level to 0, and do something.
     
  3. Offline

    PizzaPixel

    ShadowLAX So it would be like this ?
    Code:java
    1. final int ID;
    2.  
    3. p.setExp(30);
    4. ID = Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
    5. public void run() {
    6. p.setExp(p.getExp() - 0.1);
    7. if (p.getExp() == 0) {
    8. Bukkit.getScheduler().cancelTask(ID);
    9. p.sendmessage( "Your cool")
    10. }
    11. }, 0, 2)
     
  4. Offline

    ShadowLAX

    PizzaPixel You could do it like that, but the setExp() method sets individual xp that makes up a level. Also, I don't approve of double posts.
     
  5. Offline

    PizzaPixel

    ShadowLAX Lol sorry about the double post its because i was tired

    ShadowLAX What do you mean by the setExp() method sets individual xp that makes up a level and how would i fix that??

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

    AoH_Ruthless

    ShadowLAX likes this.
  7. Offline

    PizzaPixel

    AoH_Ruthless You think i Shouldn't code well guess what im gonna code till my server becomes popular.
     
  8. Offline

    HyrulesLegend

    Oh lord.. it's one of them..
    [​IMG]
     
  9. Offline

    PizzaPixel

    AoH_Ruthless Because theres no way you can ask for some big help with something your confused without getting said 'You Should Stop coding' or "LEARN JAVA"

    HyrulesLegend Lol

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

    HyrulesLegend

    Learn Java.. honestly Bukkit is an API for Java, if you don't know Java you won't be going anywhere..
     
  11. Offline

    PizzaPixel

  12. Offline

    HyrulesLegend

    Why is there some reason I doubt this?
     
  13. Offline

    PizzaPixel

    HyrulesLegend Because i dont understand some Totally bukkit code that has nothing to do with java
     
  14. Offline

    HyrulesLegend

    You didn't even understand defining a player..
     
  15. Offline

    AoH_Ruthless

    Don't take it the wrong way. I'm not telling you to give up coding and never say the word 'Java' again.

    I have no idea about how much you know Java. You could be working at Sun Microsystems, but you obviously aren't. You don't have the mindset a coder needs: You lack a work ethic, maturity, and integrity.

    You need to learn to do things yourself. A real coder knows spoonfeeding is never the solution. I never told you to "LEARN JAVA" or "Stop coding" if you look at any of the threads I post in. I told you to take a break because you kept saying you are "tired" or "forget what [your] plugin is..".

    The Bukkit forums is one of the nicest forum communities I've seen because it overall lacks the qualities you've displayed (at least in recent hours): Arrogance and Immaturity.

    So please, just take to heart what everyone is saying because it will make you a better developer and maybe a better person! I'm not trying to be mean or come across as rude, but I'm not going to lie to you.

    Edit: PizzaPixel

    Edit2: The reason everyone is so doubtful of your acclaimed skills is because of my college thesis I've written just now. Also, the help you are asking for isn't completely Bukkit based. You are asking people to spell out answers for you ("how can I fix setExp()?"). Developers (imo) should know to actually try and figure it out (google, searching on the forums, etc..).
     
  16. Offline

    PizzaPixel

    kk i just took your last post the wrong way but anyway today i wasnt thinking
     
Thread Status:
Not open for further replies.

Share This Page