More things to GraceTimer

This commit is contained in:
Driftay 2020-04-07 22:24:07 -04:00
parent d4ac0ab310
commit 380caf1ca3
4 changed files with 22 additions and 3 deletions

View File

@ -1,5 +1,12 @@
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.
* All rights reserved 2020.
@ -8,6 +15,7 @@ package com.massivecraft.factions.util.timer;
public abstract class GlobalTimer extends Timer {
private TimerRunnable runnable;
public GlobalTimer(String name, long defaultCooldown) {
super(name, defaultCooldown);
}

View File

@ -1,8 +1,6 @@
package com.massivecraft.factions.util.timer;
import com.massivecraft.factions.FactionsPlugin;
import com.massivecraft.factions.util.Config;
import com.massivecraft.factions.util.timer.type.GraceTimer;
/**
* Factions - Developed by Driftay.

View File

@ -1,7 +1,6 @@
package com.massivecraft.factions.util.timer;
import com.massivecraft.factions.FactionsPlugin;
import com.massivecraft.factions.util.Config;
import java.util.UUID;

View File

@ -3,6 +3,7 @@ package com.massivecraft.factions.util.timer.type;
import com.massivecraft.factions.Conf;
import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.util.Config;
import com.massivecraft.factions.util.timer.GlobalTimer;
import org.bukkit.Material;
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());
}
}