Move SendMultipleMatchError to TSPlayer.
This is a great method for a player to have and not for the Utils class to have.
This commit is contained in:
parent
afdedee1c4
commit
48393d60c7
4 changed files with 54 additions and 54 deletions
|
|
@ -34,6 +34,7 @@ using TShockAPI.DB;
|
|||
using TShockAPI.Hooks;
|
||||
using TShockAPI.Net;
|
||||
using Timer = System.Timers.Timer;
|
||||
using System.Linq;
|
||||
|
||||
namespace TShockAPI
|
||||
{
|
||||
|
|
@ -1600,6 +1601,21 @@ namespace TShockAPI
|
|||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the player an error message stating that more than one match was found
|
||||
/// appending a csv list of the matches.
|
||||
/// </summary>
|
||||
/// <param name="matches">An enumerable list with the matches</param>
|
||||
public void SendMultipleMatchError(IEnumerable<object> matches)
|
||||
{
|
||||
SendErrorMessage("More than one match found: ");
|
||||
|
||||
var lines = PaginationTools.BuildLinesFromTerms(matches.ToArray());
|
||||
lines.ForEach(SendInfoMessage);
|
||||
|
||||
SendErrorMessage("Use \"my query\" for items with spaces.");
|
||||
}
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
private void LogStackFrame()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue