Nearby Command args

Discussion in 'Spigot Plugin Development' started by Owner_jomzaza, Jun 17, 2018.

  1. Like this

    /command reload - Result: reload
    /command rea Result: Did you mean /command reload ?

    Thanks you for readings.
  2. You could have a list outside the onCommand method with all the possible arguments and when they send an argument that isn't valid, loop through the list and calculate the percentage of how similar the argument they put is to the one in the loop with something like this:
    and find the one of greater percentage