Allow players to monitor joins and leaves of their faction members.
Larger servers tend to have join and leave messages disabled for the entire server. A few have requested to allow faction members to monitor join and leave messages of their own members.
This commit is contained in:
25
src/main/java/com/massivecraft/factions/cmd/CmdLogins.java
Normal file
25
src/main/java/com/massivecraft/factions/cmd/CmdLogins.java
Normal file
@@ -0,0 +1,25 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -61,6 +61,7 @@ public class FCmdRoot extends FCommand {
|
||||
public CmdSetFWarp cmdSetFWarp = new CmdSetFWarp();
|
||||
public CmdDelFWarp cmdDelFWarp = new CmdDelFWarp();
|
||||
public CmdModifyPower cmdModifyPower = new CmdModifyPower();
|
||||
public CmdLogins cmdLogins = new CmdLogins();
|
||||
|
||||
public FCmdRoot() {
|
||||
super();
|
||||
@@ -138,6 +139,7 @@ public class FCmdRoot extends FCommand {
|
||||
this.addSubCommand(this.cmdSetFWarp);
|
||||
this.addSubCommand(this.cmdDelFWarp);
|
||||
this.addSubCommand(this.cmdModifyPower);
|
||||
this.addSubCommand(this.cmdLogins);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user