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

37 lines
1000 B
Java
Raw Normal View History

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;
import com.massivecraft.factions.P;
2011-10-09 18:35:39 +02:00
import com.massivecraft.factions.struct.Permission;
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
//this.requiredArgs.add("");
this.optionalArgs.put("file", "all");
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;
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();
Conf.load();
2014-10-15 22:45:20 +02:00
P.p.reloadConfig();
P.p.loadLang();
2014-04-04 20:55:21 +02:00
long timeReload = (System.currentTimeMillis() - timeInitStart);
msg(TL.COMMAND_RELOAD_TIME, timeReload);
2014-04-04 20:55:21 +02:00
}
2011-05-10 19:18:35 +02:00
}