Saber-Factions/src/main/java/com/massivecraft/factions/cmd/CmdLogins.java
2018-12-21 15:46:10 -06:00

32 lines
829 B
Java

package com.massivecraft.factions.cmd;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.util.TL;
public class CmdLogins extends FCommand {
public CmdLogins() {
super();
this.aliases.add("login");
this.aliases.add("logins");
this.aliases.add("logout");
this.aliases.add("logouts");
this.senderMustBePlayer = true;
this.senderMustBeMember = true;
this.permission = Permission.MONITOR_LOGINS.node;
}
@Override
public void perform() {
boolean monitor = fme.isMonitoringJoins();
fme.msg(TL.COMMAND_LOGINS_TOGGLE, String.valueOf(!monitor));
fme.setMonitorJoins(!monitor);
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_LOGINS_DESCRIPTION;
}
}