remove cron
This commit is contained in:
parent
8f5c9a9479
commit
66103a26e4
6
pom.xml
6
pom.xml
@ -91,11 +91,5 @@
|
||||
<version>1.18.24</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.quartz-scheduler</groupId>
|
||||
<artifactId>quartz</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@ -1,18 +1,15 @@
|
||||
package net.t2code.automatedMessages.messages;
|
||||
|
||||
import net.t2code.automatedMessages.objects.Message;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
public class CronJob implements Job {
|
||||
public class CronJob{
|
||||
public Message message;
|
||||
|
||||
public CronJob(Message message) {
|
||||
this.message=message;
|
||||
}
|
||||
|
||||
public void execute(JobExecutionContext context) throws JobExecutionException {
|
||||
public void execute() {
|
||||
SendMessage.send(message.message);
|
||||
}
|
||||
}
|
||||
|
@ -2,22 +2,12 @@ package net.t2code.automatedMessages.messages;
|
||||
|
||||
import net.t2code.automatedMessages.config.FileBuild;
|
||||
import net.t2code.automatedMessages.objects.Message;
|
||||
import net.t2code.automatedMessages.system.Main;
|
||||
import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
|
||||
import org.quartz.*;
|
||||
import org.quartz.impl.StdSchedulerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Management {
|
||||
|
||||
private static List<Scheduler> jobList = new ArrayList<>();
|
||||
|
||||
public static HashMap<JobDetail, Scheduler> hashMap = new HashMap<>();
|
||||
|
||||
private static final List<Timer> timerJobList = new ArrayList<>();
|
||||
|
||||
public static void start() {
|
||||
|
Loading…
Reference in New Issue
Block a user