Solved How to check if command was run on console?

Discussion in 'Spigot Plugin Development' started by kinukin, Feb 1, 2020.

  1. How can I check if a command was run on the console?
  2. Code (Java):
    if (commandSender instanceof ConsoleCommandSender)
  3. What event would I use?
  4. That‘s in your onCommand method. For an event, you would use the ServerCommandEvent