Saber-Factions/src/main/java/com/massivecraft/factions/cmd/CmdReload.java

46 lines
1.1 KiB
Java
Raw Normal View History

2019-01-07 04:04:38 +01:00
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Conf;
2019-06-29 03:49:46 +02:00
import com.massivecraft.factions.SaberFactions;
2019-01-07 04:04:38 +01:00
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.util.TL;
public class CmdReload extends FCommand {
public CmdReload() {
super();
this.aliases.add("reload");
this.permission = Permission.RELOAD.node;
this.disableOnLock = false;
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeModerator = false;
senderMustBeColeader = false;
senderMustBeAdmin = false;
}
@Override
public void perform() {
long timeInitStart = System.currentTimeMillis();
Conf.load();
Conf.save();
2019-06-29 03:49:46 +02:00
SaberFactions.plugin.reloadConfig();
SaberFactions.plugin.loadLang();
2019-06-29 03:49:46 +02:00
if (SaberFactions.plugin.getConfig().getBoolean("enable-faction-flight")) {
SaberFactions.plugin.factionsFlight = true;
}
long timeReload = (System.currentTimeMillis() - timeInitStart);
msg(TL.COMMAND_RELOAD_TIME, timeReload);
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_RELOAD_DESCRIPTION;
}
2019-01-07 04:04:38 +01:00
}