2015-03-05 05:55:46 +01:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
|
|
|
import com.massivecraft.factions.Conf;
|
|
|
|
import com.massivecraft.factions.struct.Permission;
|
|
|
|
import com.massivecraft.factions.zcore.util.TL;
|
|
|
|
|
|
|
|
public class CmdToggleAllianceChat extends FCommand {
|
2015-03-07 00:32:20 +01:00
|
|
|
|
2015-03-05 05:55:46 +01:00
|
|
|
public CmdToggleAllianceChat() {
|
|
|
|
super();
|
|
|
|
this.aliases.add("tac");
|
|
|
|
this.aliases.add("togglealliancechat");
|
2015-03-07 00:32:20 +01:00
|
|
|
this.aliases.add("ac");
|
2015-03-05 05:55:46 +01:00
|
|
|
|
|
|
|
this.disableOnLock = false;
|
|
|
|
|
|
|
|
this.permission = Permission.TOGGLE_ALLIANCE_CHAT.node;
|
|
|
|
this.disableOnLock = false;
|
|
|
|
|
|
|
|
senderMustBePlayer = true;
|
|
|
|
senderMustBeMember = true;
|
|
|
|
senderMustBeModerator = false;
|
|
|
|
senderMustBeAdmin = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_TOGGLEALLIANCECHAT_DESCRIPTION;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void perform() {
|
|
|
|
if (!Conf.factionOnlyChat) {
|
|
|
|
msg(TL.COMMAND_CHAT_DISABLED.toString());
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2015-03-07 00:32:20 +01:00
|
|
|
boolean ignoring = fme.isIgnoreAllianceChat();
|
2015-03-05 05:55:46 +01:00
|
|
|
|
2015-03-07 00:32:20 +01:00
|
|
|
msg(ignoring ? TL.COMMAND_TOGGLEALLIANCECHAT_UNIGNORE : TL.COMMAND_TOGGLEALLIANCECHAT_IGNORE);
|
|
|
|
fme.setIgnoreAllianceChat(!ignoring);
|
2015-03-05 05:55:46 +01:00
|
|
|
}
|
|
|
|
}
|