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

37 lines
965 B
Java
Raw Normal View History

package com.massivecraft.factions.cmd;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.util.TL;
public class CmdLogins extends FCommand {
2019-12-02 19:55:38 +01:00
/**
* @author FactionsUUID Team
*/
public CmdLogins() {
super();
this.aliases.add("login");
this.aliases.add("logins");
this.aliases.add("logout");
this.aliases.add("logouts");
2018-12-21 22:46:10 +01:00
this.requirements = new CommandRequirements.Builder(Permission.MONITOR_LOGINS)
.playerOnly()
.memberOnly()
.build();
}
@Override
public void perform(CommandContext context) {
boolean monitor = context.fPlayer.isMonitoringJoins();
context.msg(TL.COMMAND_LOGINS_TOGGLE, String.valueOf(!monitor));
context.fPlayer.setMonitorJoins(!monitor);
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_LOGINS_DESCRIPTION;
}
}