Prevent task scheduling on disable.
This commit is contained in:
@@ -8,6 +8,7 @@ import com.garbagemule.MobArena.framework.Arena;
|
||||
public class Delays
|
||||
{
|
||||
public static void douse(MobArena plugin, final Player p, long delay) {
|
||||
if (!plugin.isEnabled()) return;
|
||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||
public void run() {
|
||||
if (p.isOnline()) {
|
||||
@@ -18,6 +19,7 @@ public class Delays
|
||||
}
|
||||
|
||||
public static void revivePlayer(MobArena plugin, final Arena arena, final Player p) {
|
||||
if (!plugin.isEnabled()) return;
|
||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||
public void run() {
|
||||
if (p.isOnline()) {
|
||||
|
||||
Reference in New Issue
Block a user