2012-01-15 18:41:13 +01:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
|
|
|
import com.massivecraft.factions.P;
|
|
|
|
import com.massivecraft.factions.struct.Permission;
|
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public class CmdChatSpy extends FCommand {
|
|
|
|
public CmdChatSpy() {
|
|
|
|
super();
|
|
|
|
this.aliases.add("chatspy");
|
2012-01-15 18:41:13 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
this.optionalArgs.put("on/off", "flip");
|
2012-01-15 18:41:13 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
this.permission = Permission.CHATSPY.node;
|
|
|
|
this.disableOnLock = false;
|
2012-01-15 18:41:13 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
senderMustBePlayer = true;
|
|
|
|
senderMustBeMember = false;
|
|
|
|
senderMustBeModerator = false;
|
|
|
|
senderMustBeAdmin = false;
|
|
|
|
}
|
2012-01-15 18:41:13 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
@Override
|
|
|
|
public void perform() {
|
|
|
|
fme.setSpyingChat(this.argAsBool(0, !fme.isSpyingChat()));
|
2012-01-15 18:41:13 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
if (fme.isSpyingChat()) {
|
|
|
|
fme.msg("<i>You have enabled chat spying mode.");
|
|
|
|
P.p.log(fme.getName() + " has ENABLED chat spying mode.");
|
|
|
|
} else {
|
|
|
|
fme.msg("<i>You have disabled chat spying mode.");
|
|
|
|
P.p.log(fme.getName() + " DISABLED chat spying mode.");
|
|
|
|
}
|
|
|
|
}
|
2012-01-15 18:41:13 +01:00
|
|
|
}
|