Development Assistance Bukkit Scheduler Error

Discussion in 'Plugin Help/Development/Requests' started by dart2112, Mar 19, 2015.

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

    dart2112

    Class: Link To Github

    Error: Link To Error

    I want to be able to run a for loop through a hash map and get the lowest value, then check if the player hasn't interacted with anything or moved in a while and check if the idle time is = to or greater than the time to AFK set in the config, then if it is set them AFK. But the line that gets the minimum value in the collection:
    Code:
    Integer LowestInt = (Collections.min(ActiveTime.values()));
    Throws the above error, any help with a way to get around it or to use a different method would be greatly appreciated
    Thanks in advance.
     
  2. Offline

    mttprvst13

    I think you would do
    Code:
    int LowestInt = (Collections.min(ActiveTime.values()));
    instead of
    Code:
    Integer LowestInt = (Collections.min(ActiveTime.values()));
    because int says that the variable is an integer rather than having Integer which is the instance of the integers where you can do stuff like
    Code:
    Integer.ceil(1.1);
     
  3. Offline

    timtower Administrator Administrator Moderator

    Moved to Bukkit alternatives
     
Thread Status:
Not open for further replies.

Share This Page