2011-10-09 21:57:43 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
2011-05-10 19:18:35 +02:00
|
|
|
|
2014-11-06 01:36:47 +01:00
|
|
|
import com.massivecraft.factions.Conf;
|
2018-10-23 01:42:57 +02:00
|
|
|
import com.massivecraft.factions.SavageFactions;
|
2011-10-09 18:35:39 +02:00
|
|
|
import com.massivecraft.factions.struct.Permission;
|
2018-08-21 05:55:41 +02:00
|
|
|
import com.massivecraft.factions.util.Particles.ReflectionUtils;
|
2014-12-08 00:12:52 +01:00
|
|
|
import com.massivecraft.factions.zcore.util.TL;
|
2011-05-10 19:18:35 +02:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public class CmdReload extends FCommand {
|
|
|
|
|
|
|
|
public CmdReload() {
|
2014-07-01 22:10:18 +02:00
|
|
|
super();
|
|
|
|
this.aliases.add("reload");
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-07-01 22:10:18 +02:00
|
|
|
this.permission = Permission.RELOAD.node;
|
|
|
|
this.disableOnLock = false;
|
2014-04-04 20:55:21 +02:00
|
|
|
|
2014-07-01 22:10:18 +02:00
|
|
|
senderMustBePlayer = false;
|
|
|
|
senderMustBeMember = false;
|
|
|
|
senderMustBeModerator = false;
|
2018-03-26 23:43:15 +02:00
|
|
|
senderMustBeColeader = false;
|
2014-04-04 20:55:21 +02:00
|
|
|
senderMustBeAdmin = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void perform() {
|
2014-07-01 22:10:18 +02:00
|
|
|
long timeInitStart = System.currentTimeMillis();
|
2014-10-05 07:28:00 +02:00
|
|
|
Conf.load();
|
2018-11-07 06:38:43 +01:00
|
|
|
SavageFactions.plugin.reloadConfig();
|
|
|
|
SavageFactions.plugin.loadLang();
|
2018-08-21 05:55:41 +02:00
|
|
|
int version = Integer.parseInt(ReflectionUtils.PackageType.getServerVersion().split("_")[1]);
|
|
|
|
|
|
|
|
|
2018-11-07 06:38:43 +01:00
|
|
|
if (SavageFactions.plugin.getConfig().getBoolean("enable-faction-flight")) {
|
|
|
|
SavageFactions.plugin.factionsFlight = true;
|
2018-08-21 05:55:41 +02:00
|
|
|
}
|
2014-04-04 20:55:21 +02:00
|
|
|
long timeReload = (System.currentTimeMillis() - timeInitStart);
|
|
|
|
|
2014-12-08 00:12:52 +01:00
|
|
|
msg(TL.COMMAND_RELOAD_TIME, timeReload);
|
2014-04-04 20:55:21 +02:00
|
|
|
}
|
2015-01-22 00:58:33 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_RELOAD_DESCRIPTION;
|
|
|
|
}
|
2011-05-10 19:18:35 +02:00
|
|
|
}
|