Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import uk.co.joshuawoolley.simpleticketmanager.database.Queries;
import uk.co.joshuawoolley.simpleticketmanager.enums.TicketStates;
import uk.co.joshuawoolley.simpleticketmanager.events.SimpleTicketEvent;
import static java.lang.Math.round;

/**
* @author Josh Woolley
Expand Down Expand Up @@ -158,10 +157,9 @@ public void createComment(CommandSender sender, String player, String comment, i
/**
* Task to keep updating database
*/
@SuppressWarnings("deprecation")
public void startTask() {
long delay = plugin.getConfig().getLong("updateTime") * 20;
Bukkit.getScheduler().runTaskTimerAsynchronously(plugin, new BukkitRunnable() {
BukkitRunnable tasky = new BukkitRunnable() {
public void run(){
boolean successful = false;
int noneUpdated = 0;
Expand Down Expand Up @@ -234,7 +232,8 @@ public void run(){
Bukkit.getLogger().info("[SimpleTicketManager] New tickets/comments have been added to the server");
}
}
}, 0L, delay);
};
tasky.runTaskTimerAsynchronously(plugin, 0L, delay);

}

Expand Down