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-12-08 00:12:52 +01:00
|
|
|
import com.massivecraft.factions.zcore.util.TL;
|
2012-01-15 18:41:13 +01:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public class CmdChatSpy extends FCommand {
|
2014-08-05 17:17:27 +02:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public CmdChatSpy() {
|
2014-07-01 22:10:18 +02:00
|
|
|
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-07-01 22:10:18 +02:00
|
|
|
this.permission = Permission.CHATSPY.node;
|
|
|
|
this.disableOnLock = false;
|
2012-01-15 18:41:13 +01:00
|
|
|
|
2014-07-01 22:10:18 +02:00
|
|
|
senderMustBePlayer = true;
|
|
|
|
senderMustBeMember = false;
|
|
|
|
senderMustBeModerator = false;
|
|
|
|
senderMustBeAdmin = false;
|
2014-04-04 20:55:21 +02:00
|
|
|
}
|
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()) {
|
2014-12-08 00:12:52 +01:00
|
|
|
fme.msg(TL.COMMAND_CHATSPY_ENABLE);
|
|
|
|
P.p.log(fme.getName() + TL.COMMAND_CHATSPY_ENABLELOG.toString());
|
2014-07-01 21:52:40 +02:00
|
|
|
} else {
|
2014-12-08 00:12:52 +01:00
|
|
|
fme.msg(TL.COMMAND_CHATSPY_DISABLE);
|
|
|
|
P.p.log(fme.getName() + TL.COMMAND_CHATSPY_DISABLELOG.toString());
|
2014-04-04 20:55:21 +02:00
|
|
|
}
|
|
|
|
}
|
2012-01-15 18:41:13 +01:00
|
|
|
}
|