mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-30 06:33:55 +01:00
Prevent task scheduling on disable.
This commit is contained in:
parent
859baf7b71
commit
a5fb96a880
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user