Use /testfor to make a custom command

Basically, I’m trying to recreate the Faction plugins /f map in my single-player without mods as my PC doesn’t run them very well. (I know it sounds strange.) I am trying to use the /testfor to test if I have written ‘/f map’ in chat, and if I have, it would show me a custom generated map.
I don’t know how to word this better xD Essentially what I want is for it to test if I have written a command in chat, and if I have, display something.

  • I'm stuck in a teleporting loop. What can I do?
  • Is there an easier way to detect for a block around the player?
  • How can I tell if two Minecraft mods are compatible?
  • What's the difference between the Fancy and Fast settings in Minecraft?
  • How can I run a Minecraft Server on multiple CPU cores?
  • How can I trick Minecraft into thinking two computers are on the same wifi network?
  • Do armor enchantments stack?
  • Where are my Screenshots?
  • What can I do with Rotten Flesh?
  • How exactly do I install Minecraft Mods and what is Forge?
  • Movement and digging/mining speed
  • Where do I find the NEI configuration file?
  • One Solution collect form web for “Use /testfor to make a custom command”

    You can’t test exactly for /f map, but you can do similar with /triggers.

    First, set up the trigger objective:

    /scoreboard objectives add fmap trigger
    

    Then, when people type:

    /trigger fmap set 1
    

    You can select them with @a[score_fmap_min=1], or tell them something like:

    /tellraw @a[score_fmap_min=1] {"text":"message"}
    

    As a side note, creating a faction plugin with command blocks is a very ambitious goal, may be worth starting off with something simpler and smaller.

    We love Playing Games, especially Video Games.