2015-01-06 23:06:46 +01:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
|
|
|
import com.massivecraft.factions.struct.Permission;
|
|
|
|
import com.massivecraft.factions.zcore.util.TL;
|
|
|
|
|
|
|
|
public class CmdLogins extends FCommand {
|
|
|
|
|
2019-09-15 11:14:14 +02:00
|
|
|
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
|
|
|
|
2019-09-15 11:14:14 +02:00
|
|
|
this.requirements = new CommandRequirements.Builder(Permission.MONITOR_LOGINS)
|
|
|
|
.playerOnly()
|
|
|
|
.memberOnly()
|
|
|
|
.build();
|
|
|
|
}
|
2015-01-06 23:06:46 +01:00
|
|
|
|
2019-09-15 11:14:14 +02:00
|
|
|
@Override
|
|
|
|
public void perform(CommandContext context) {
|
|
|
|
boolean monitor = context.fPlayer.isMonitoringJoins();
|
|
|
|
context.msg(TL.COMMAND_LOGINS_TOGGLE, String.valueOf(!monitor));
|
|
|
|
context.fPlayer.setMonitorJoins(!monitor);
|
|
|
|
}
|
2015-01-22 00:58:33 +01:00
|
|
|
|
2019-09-15 11:14:14 +02:00
|
|
|
@Override
|
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_LOGINS_DESCRIPTION;
|
|
|
|
}
|
2015-01-06 23:06:46 +01:00
|
|
|
}
|