mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-19 04:07:10 -04:00
Fix doing /i on an invalid name showing the 'invalid player name' message twice. (Thanks lordmakerreturns)
This commit is contained in:
parent
a59666f0be
commit
ba3be87bc0
@ -33,12 +33,13 @@ namespace MCGalaxy.Commands.Info {
|
|||||||
|
|
||||||
public override void Use(Player p, string message, CommandData data) {
|
public override void Use(Player p, string message, CommandData data) {
|
||||||
if (message.Length == 0) message = p.name;
|
if (message.Length == 0) message = p.name;
|
||||||
|
if (!Formatter.ValidName(p, message, "player")) return;
|
||||||
|
|
||||||
int matches;
|
int matches;
|
||||||
Player who = PlayerInfo.FindMatches(p, message, out matches);
|
Player who = PlayerInfo.FindMatches(p, message, out matches);
|
||||||
if (matches > 1) return;
|
if (matches > 1) return;
|
||||||
|
|
||||||
if (matches == 0) {
|
if (matches == 0) {
|
||||||
if (!Formatter.ValidName(p, message, "player")) return;
|
|
||||||
p.Message("Searching database for the player..");
|
p.Message("Searching database for the player..");
|
||||||
PlayerData target = PlayerDB.Match(p, message);
|
PlayerData target = PlayerDB.Match(p, message);
|
||||||
if (target == null) return;
|
if (target == null) return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user