Search in sources :

Example 1 with TagRemoveMentions

use of com.github.vaerys.tags.cctags.TagRemoveMentions in project DiscordSailv2 by Vaerys-Dawn.

the class AdminEcho method execute.

@Override
public String execute(String args, CommandObject command) {
    List<TagObject> tags = TagList.getType(TagType.CC);
    ListIterator<TagObject> iterator = tags.listIterator();
    while (iterator.hasNext()) {
        TagObject object = iterator.next();
        if (object.name.equals(new TagRemoveMentions(0).name)) {
            iterator.remove();
        }
    }
    args += new TagRemoveSanitizeTag(0).name;
    TagList.sort(tags);
    for (TagObject t : tags) {
        args = t.handleTag(args, command, "");
    }
    return args;
}
Also used : TagRemoveMentions(com.github.vaerys.tags.cctags.TagRemoveMentions) TagObject(com.github.vaerys.templates.TagObject) TagRemoveSanitizeTag(com.github.vaerys.tags.cctags.TagRemoveSanitizeTag)

Aggregations

TagRemoveMentions (com.github.vaerys.tags.cctags.TagRemoveMentions)1 TagRemoveSanitizeTag (com.github.vaerys.tags.cctags.TagRemoveSanitizeTag)1 TagObject (com.github.vaerys.templates.TagObject)1