Minecraft wiki entry for Command_blocks_and_functions, associated text: When a player walks over a pressure plate, it can trigger a command block with /say <message> or /title <player> title <message>. @p can be used within the message to display the player closest to the command block upon triggering.