More things to GraceTimer
This commit is contained in:
parent
d4ac0ab310
commit
380caf1ca3
@ -1,5 +1,12 @@
|
|||||||
package com.massivecraft.factions.util.timer;
|
package com.massivecraft.factions.util.timer;
|
||||||
|
|
||||||
|
import com.massivecraft.factions.util.Config;
|
||||||
|
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Factions - Developed by Driftay.
|
* Factions - Developed by Driftay.
|
||||||
* All rights reserved 2020.
|
* All rights reserved 2020.
|
||||||
@ -8,6 +15,7 @@ package com.massivecraft.factions.util.timer;
|
|||||||
public abstract class GlobalTimer extends Timer {
|
public abstract class GlobalTimer extends Timer {
|
||||||
private TimerRunnable runnable;
|
private TimerRunnable runnable;
|
||||||
|
|
||||||
|
|
||||||
public GlobalTimer(String name, long defaultCooldown) {
|
public GlobalTimer(String name, long defaultCooldown) {
|
||||||
super(name, defaultCooldown);
|
super(name, defaultCooldown);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package com.massivecraft.factions.util.timer;
|
package com.massivecraft.factions.util.timer;
|
||||||
|
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
|
||||||
import com.massivecraft.factions.util.Config;
|
import com.massivecraft.factions.util.Config;
|
||||||
import com.massivecraft.factions.util.timer.type.GraceTimer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Factions - Developed by Driftay.
|
* Factions - Developed by Driftay.
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package com.massivecraft.factions.util.timer;
|
package com.massivecraft.factions.util.timer;
|
||||||
|
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
import com.massivecraft.factions.util.Config;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package com.massivecraft.factions.util.timer.type;
|
|||||||
import com.massivecraft.factions.Conf;
|
import com.massivecraft.factions.Conf;
|
||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.FPlayers;
|
import com.massivecraft.factions.FPlayers;
|
||||||
|
import com.massivecraft.factions.util.Config;
|
||||||
import com.massivecraft.factions.util.timer.GlobalTimer;
|
import com.massivecraft.factions.util.timer.GlobalTimer;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -40,4 +41,17 @@ public class GraceTimer extends GlobalTimer implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void load(Config config) {
|
||||||
|
config.get(this.name, isPaused());
|
||||||
|
config.get(this.name, getRemaining());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void save(Config config) {
|
||||||
|
config.set(this.name, isPaused());
|
||||||
|
config.set(this.name, getRemaining());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user