mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-18 19:56:50 -04:00
/search players now searches all players instead of currently online
This commit is contained in:
parent
cb451653b3
commit
e3d58e3e38
@ -14,7 +14,8 @@ permissions and limitations under the Licenses.
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MCGalaxy.Blocks;
|
||||
using MCGalaxy.DB;
|
||||
using MCGalaxy.SQL;
|
||||
using BlockID = System.UInt16;
|
||||
|
||||
namespace MCGalaxy.Commands.Info
|
||||
@ -86,9 +87,10 @@ namespace MCGalaxy.Commands.Info
|
||||
}
|
||||
|
||||
static void SearchPlayers(Player p, string keyword, string modifier) {
|
||||
Player[] online = PlayerInfo.Online.Items;
|
||||
List<string> players = Matcher.Filter(online, keyword, pl => pl.name,
|
||||
pl => p.CanSee(pl), pl => pl.ColoredName);
|
||||
List<PlayerData> stats = new List<PlayerData>();
|
||||
Database.ReadRows("Players", "*", record => stats.Add(PlayerData.Parse(record)));
|
||||
|
||||
List<string> players = Matcher.Filter(stats, keyword, pl => pl.Name);
|
||||
OutputList(p, keyword, "search players", "players", modifier, players);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user