Folia Support
This commit is contained in:
parent
a5ba77a3d2
commit
b97840a320
@ -1,8 +1,8 @@
|
|||||||
package fr.xephi.authme.data.limbo;
|
package fr.xephi.authme.data.limbo;
|
||||||
|
|
||||||
|
import com.github.Anon8281.universalScheduler.scheduling.tasks.MyScheduledTask;
|
||||||
import fr.xephi.authme.task.MessageTask;
|
import fr.xephi.authme.task.MessageTask;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -22,7 +22,7 @@ public class LimboPlayer {
|
|||||||
private final Location loc;
|
private final Location loc;
|
||||||
private final float walkSpeed;
|
private final float walkSpeed;
|
||||||
private final float flySpeed;
|
private final float flySpeed;
|
||||||
private BukkitTask timeoutTask = null;
|
private MyScheduledTask timeoutTask = null;
|
||||||
private MessageTask messageTask = null;
|
private MessageTask messageTask = null;
|
||||||
private LimboPlayerState state = LimboPlayerState.PASSWORD_REQUIRED;
|
private LimboPlayerState state = LimboPlayerState.PASSWORD_REQUIRED;
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ public class LimboPlayer {
|
|||||||
*
|
*
|
||||||
* @return The timeout task associated to the player
|
* @return The timeout task associated to the player
|
||||||
*/
|
*/
|
||||||
public BukkitTask getTimeoutTask() {
|
public MyScheduledTask getTimeoutTask() {
|
||||||
return timeoutTask;
|
return timeoutTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ public class LimboPlayer {
|
|||||||
*
|
*
|
||||||
* @param timeoutTask The task to set
|
* @param timeoutTask The task to set
|
||||||
*/
|
*/
|
||||||
public void setTimeoutTask(BukkitTask timeoutTask) {
|
public void setTimeoutTask(MyScheduledTask timeoutTask) {
|
||||||
if (this.timeoutTask != null) {
|
if (this.timeoutTask != null) {
|
||||||
this.timeoutTask.cancel();
|
this.timeoutTask.cancel();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package fr.xephi.authme.service;
|
package fr.xephi.authme.service;
|
||||||
|
|
||||||
|
import com.github.Anon8281.universalScheduler.scheduling.tasks.MyScheduledTask;
|
||||||
import fr.xephi.authme.initialization.SettingsDependent;
|
import fr.xephi.authme.initialization.SettingsDependent;
|
||||||
import fr.xephi.authme.message.MessageKey;
|
import fr.xephi.authme.message.MessageKey;
|
||||||
import fr.xephi.authme.message.Messages;
|
import fr.xephi.authme.message.Messages;
|
||||||
@ -8,7 +9,6 @@ import fr.xephi.authme.permission.PermissionsManager;
|
|||||||
import fr.xephi.authme.settings.Settings;
|
import fr.xephi.authme.settings.Settings;
|
||||||
import fr.xephi.authme.settings.properties.ProtectionSettings;
|
import fr.xephi.authme.settings.properties.ProtectionSettings;
|
||||||
import fr.xephi.authme.util.AtomicIntervalCounter;
|
import fr.xephi.authme.util.AtomicIntervalCounter;
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@ -32,7 +32,7 @@ public class AntiBotService implements SettingsDependent {
|
|||||||
// Service status
|
// Service status
|
||||||
private AntiBotStatus antiBotStatus;
|
private AntiBotStatus antiBotStatus;
|
||||||
private boolean startup;
|
private boolean startup;
|
||||||
private BukkitTask disableTask;
|
private MyScheduledTask disableTask;
|
||||||
private AtomicIntervalCounter flaggedCounter;
|
private AtomicIntervalCounter flaggedCounter;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|||||||
@ -15,7 +15,6 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -105,8 +104,8 @@ public class BukkitService implements SettingsDependent {
|
|||||||
* @throws IllegalArgumentException if plugin is null
|
* @throws IllegalArgumentException if plugin is null
|
||||||
* @throws IllegalArgumentException if task is null
|
* @throws IllegalArgumentException if task is null
|
||||||
*/
|
*/
|
||||||
public BukkitTask runTaskLater(Runnable task, long delay) {
|
public MyScheduledTask runTaskLater(Runnable task, long delay) {
|
||||||
return (BukkitTask) AuthMe.getScheduler().runTaskLater(task, delay);
|
return AuthMe.getScheduler().runTaskLater(task, delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user