Int not minusing from config?

Discussion in 'Plugin Development' started by WesJD, Nov 17, 2014.

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

    WesJD

    So, I was just playing around with blocks & holograms with a config, though when I place the hologram(which currently does nothing) it doesn't remove one from the int. Seems like a noob question, I'm out of wack today. Any help?

    Code:
    Code:java
    1. int time = Main.getTime();
    2. public void run() {
    3. if(time == time) {
    4. e.getPlayer().sendMessage("test - placed?");
    5. new Hologram(ChatColor.YELLOW.toString() + time + "").show(loc);
    6. time--;


    I've found what's wrong. It's the fact that when it grabs the time, it will stay the same. Is there a way to edit something I've already gotten? Or am I just over thinking this?

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

    Skionz

    WesJD Is there really a point to this line?
    Code:
    if(time == time) {
     
  3. Offline

    WesJD

    Skionz
    Since it has to update the hologram I check if it has updated yet.
     
Thread Status:
Not open for further replies.

Share This Page