mirror of
https://github.com/SimplexDevelopment/SimplexSS.git
synced 2025-04-18 03:13:00 +00:00
52 lines
1.1 KiB
Java
52 lines
1.1 KiB
Java
package io.github.simplex.api;
|
|
|
|
import org.bukkit.plugin.Plugin;
|
|
|
|
public abstract class ExecutableService implements IService {
|
|
private final int serviceID;
|
|
private final Plugin plugin;
|
|
private final long delay;
|
|
private final long period;
|
|
private final boolean delayed;
|
|
private final boolean repeating;
|
|
|
|
public ExecutableService(Plugin plugin, int serviceID, long delay, long period, boolean delayed, boolean repeating) {
|
|
this.plugin = plugin;
|
|
this.serviceID = serviceID;
|
|
this.repeating = repeating;
|
|
this.delay = delay;
|
|
this.period = period;
|
|
this.delayed = delayed;
|
|
}
|
|
|
|
@Override
|
|
public int getServiceID() {
|
|
return serviceID;
|
|
}
|
|
|
|
@Override
|
|
public Plugin getProvidingPlugin() {
|
|
return plugin;
|
|
}
|
|
|
|
@Override
|
|
public long getDelay() {
|
|
return delay;
|
|
}
|
|
|
|
@Override
|
|
public long getPeriod() {
|
|
return period;
|
|
}
|
|
|
|
@Override
|
|
public boolean isDelayed() {
|
|
return delayed;
|
|
}
|
|
|
|
@Override
|
|
public boolean isRepeating() {
|
|
return repeating;
|
|
}
|
|
}
|